Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gorlock27
Starting Member
3 Posts |
Posted - 2011-02-23 : 18:56:58
|
| This is my first assignment making sql queries and I need some help with this question. List the books that each patron currently has checked out with the patron number, patron name, telephone number, book number, and title. All books that are past due include the past due fee. CREATE VIEW checked_out_fee ASSELECT patron_id, first_name, last_name, phone, book_id, book_titleFROM patron, checkout, copy, bookWHERE patron.patron_id = checkout.checkout_idAND copy.copy_id = checkout.copy_idAND copy.book_id = book.book_idAND due_date > retrun_date?? ORDER BY patron_id;any suggestions would be great! |
|
|
gorlock27
Starting Member
3 Posts |
Posted - 2011-02-23 : 19:18:35
|
| i've seen that you can use the DATEDIFF function. i assume you should use that somehow, but not sure. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-02-23 : 21:00:21
|
shouldn't it be return_date > due_date ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|