Popular Posts

SQLblog.com - The SQL Server blog spot on the web

Tuesday, October 24, 2017

How to only select 11pm to 7am in DateTime (many months of data) DDM&DDL included :)

SQLServerCentral » Latest topics
How to only select 11pm to 7am in DateTime (many months of data) DDM&DDL included :)
Looking to run a report for a few years but only between 11pm and 7am.

[code language="sql"]CREATE TABLE mytable(
 i_ticket_id  INTEGER NOT NULL PRIMARY KEY
,c_grand_total MONEY(6,2)

No comments: