Guest_imported
New member
- Jan 1, 1970
- 0
I have a few queries in Access97 that need to be converted to stored procedures on an SQL Server 7.
It looks like (this is shortened):
....
WHERE (((resourcestable.AvailableFromDate)<Date()) AND ((resourcestable.AvailableToDate)>Date()) AND ((resourcestable.AvailableFromTime)<Time()) AND ((resourcestable.AvailableToTime)>Time()))
....
In access97 it's possible to compare the time that is stored in the AvaialleFromTime-column with TIME() (which is the time at the moment right now). SQL Server doesn't have any similar TIME()-function as I've seen.
I wonder how I could compare the times (without dates) to see if the time that is stored in the table is smaller or bigger than the time right now. I.e. if 12:00:00 is bigger or greater than 08:00:00.
Any help is greatly appreciated!
sincerely Bob Nachbar
It looks like (this is shortened):
....
WHERE (((resourcestable.AvailableFromDate)<Date()) AND ((resourcestable.AvailableToDate)>Date()) AND ((resourcestable.AvailableFromTime)<Time()) AND ((resourcestable.AvailableToTime)>Time()))
....
In access97 it's possible to compare the time that is stored in the AvaialleFromTime-column with TIME() (which is the time at the moment right now). SQL Server doesn't have any similar TIME()-function as I've seen.
I wonder how I could compare the times (without dates) to see if the time that is stored in the table is smaller or bigger than the time right now. I.e. if 12:00:00 is bigger or greater than 08:00:00.
Any help is greatly appreciated!
sincerely Bob Nachbar