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 |
|
BrianBurgit
Starting Member
12 Posts |
Posted - 2009-12-16 : 15:52:42
|
| I have a select query that finds records ready for payment, like thisSELECT P.ID, P.AmountFROM Payments P INNER JOIN HotelBookings H ON P.Segnum = H.Segnum WHERE H.ArrivalDate) Between [Starting Hotel Arrive Date] And [Ending Hotel Arrive Date]) This works fine. I now would like to UPDATE the Payments Table, setting the DatePaid field to the current date. I'd like to do something like thisUPDATE PaymentsSET DatePaid = GetDate()WHERE H.ArrivalDate) Between [Starting Hotel Arrive Date] And [Ending Hotel Arrive Date]) but of course this doesn't quite work. How can I use the HotelBookings Table in my Update query?Thanks,Brian |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|