Hi
I need to select records which were updated previous working day. This means if today is a Monday, I need to select records which were updated on Friday and not yesterday, which will be a Sunday.
I am using WHERE clause to get the previous day, but how can I do a selection whithin a WHERE clause to check if previous day was Mon-Fri or if today is 'Mon' then select the records which were updated 2 days before, otherwise select the records which were updated previous day.
Can I use IF statement in SQL 2000.
I would appreciate any help.
Thanks, Sivi
I need to select records which were updated previous working day. This means if today is a Monday, I need to select records which were updated on Friday and not yesterday, which will be a Sunday.
I am using WHERE clause to get the previous day, but how can I do a selection whithin a WHERE clause to check if previous day was Mon-Fri or if today is 'Mon' then select the records which were updated 2 days before, otherwise select the records which were updated previous day.
Can I use IF statement in SQL 2000.
I would appreciate any help.
Thanks, Sivi