0

hi pls tell me this command is correct or not.....
if wrong give me the correct command.......

"insert into guesthouse(status) values ('C' where (date_of_arr <= getdate() and date_of_dept<=getdate()) or 'O' where(date_of_arr <= getdate() and date_of_dept >= getdate() or 'S' where (date_of_arr >= getdate() and date_of_dept >= getdate()")

here iam insert into status as follows

status when

=C (date_of_arr <= getdate() and date_of_dept<=getdate())
=O (date_of_arr <= getdate() and date_of_dept >= getdate()
=S (date_of_arr >= getdate() and date_of_dept >= getdate()

here date_of_arr and date_ of_dept are entering date and departure date...........and get date is system date

Edited by kanuri1: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by reach_yousuf
0

hi pls tell me this command is correct or not.....
if wrong give me the correct command.......

"insert into guesthouse(status) values ('C' where (date_of_arr <= getdate() and date_of_dept<=getdate()) or 'O' where(date_of_arr <= getdate() and date_of_dept >= getdate() or 'S' where (date_of_arr >= getdate() and date_of_dept >= getdate()")

Hi

the query syntax is wrong. Pls. specify the condition you want to check

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.