Friday, 15 April 2011

tsql - Departure Date Greater Than Arrival Date -



tsql - Departure Date Greater Than Arrival Date -

how create sure departure date greater arrival date in next code.

select arrivaldate, dateadd(day, rand(checksum(newid()))*1.5 * lengthofstay.lengthofstay, arrivaldate) departuredate bookings, lengthofstay order arrivaldate

thanks

wayne

try query

select * ( select arrivaldate, dateadd(day, rand(checksum(newid()))*1.5 * lengthofstay.lengthofstay, arrivaldate) departuredate bookings, lengthofstay ) a.departuredate > a.arrivaldate order a.arrivaldate

tsql

No comments:

Post a Comment