|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL joins/update
Hi I am having a great deal of trouble with this join command and my professor's clarity is killing me.
table book_copy: (CO, Book_ID, Category, DATE_DUE, Cust_IDN, NDATE_OUT, RDATE_OUT, Cust_IDR) ...where Cust_IDN is when a customer checks out a normal copy and Cust_IDR is when a customer checks out a reserve copy. table check_out: (Category, Max_Days) this table shows the relationship of how long the customer can check out the book eg. Category Max_Days ________ _________ faculty 70 employee 50 student 40 associate 20 table customer: (Cust_ID, Category) category as in faculty, employee, student, associate What he wants is for us to make a join statement that updates date_due according to the ndate_out and rdate_out (when it was checked out). what I have so far is: update copyBC set date_due = (select ndate_out + max_days from check_out_rule, customer where copyBC.CIDN = customer.CID and check_out_rule.category = customer.category); but it is not working... any help would be great thanks. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > SQL joins/update |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|