Re: Time Question
From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 02/13/04
- Next message: Steve Kass: "Re: dynamic sql with fetch"
- Previous message: Prasad Koukuntla: "Re: Need help with a query..."
- In reply to: Aaron Bertrand - MVP: "Re: Time Question"
- Next in thread: Jason MacKenzie: "Re: Time Question"
- Reply: Jason MacKenzie: "Re: Time Question"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Feb 2004 14:11:35 -0500
PS you might consider adding a computed column, or creating a view, so you
can query directly against the 10-minute-offset value instead of constantly
performing date math.
One way to do it would be to add a column AS DATEADD(MINUTE, -10,
RecordTime)
Another way to do it would be to have the procedure that enters the row
calculate which "hour" the data belongs to, and store that in a tinyint.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
- Next message: Steve Kass: "Re: dynamic sql with fetch"
- Previous message: Prasad Koukuntla: "Re: Need help with a query..."
- In reply to: Aaron Bertrand - MVP: "Re: Time Question"
- Next in thread: Jason MacKenzie: "Re: Time Question"
- Reply: Jason MacKenzie: "Re: Time Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|