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

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