Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««23456

T-SQL Expand / Collapse
Author
Message
Posted Friday, March 6, 2009 12:32 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, March 25, 2014 4:09 PM
Points: 434, Visits: 113
as mentioned in a prior comment, the answer to the question is wrong!!
Try runing this and you'll see a 2/1/09 value....

create table #a (InsertedOn datetime)
insert into #a values ('20090131');
insert into #a values ('01/31/09 23:59:59.999');
insert into #a values ('01/31/09 12:59:59.999');
insert into #a values ('20090131');
insert into #a values ('20090131');
SELECT [InsertedOn] FROM #a WHERE [InsertedOn] BETWEEN '20090131' AND '20090131 23:59:59.999'
drop table #a



Dennis Parks
MCSE, MCDBA, MCSD, MCAD, MCTS
Post #670577
Posted Monday, November 2, 2009 9:53 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 11:34 AM
Points: 313, Visits: 177
in the question never showed an implicit date time conversion, therefore you can not require that condition as granted.
Your question is bad formulated or you are trying to trick (fool) people.
Post #812720
Posted Monday, November 2, 2009 9:56 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 11:34 AM
Points: 313, Visits: 177
in the question never showed an implicit date time conversion, therefore you can not require that condition as granted.
Your question is bad formulated or you are trying to trick (fool) people.
Post #812721
« Prev Topic | Next Topic »

Add to briefcase «««23456

Permissions Expand / Collapse