Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to store time (not date) in SQL and query from VFP
Message
From
06/03/2008 15:22:00
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01297626
Message ID:
01299497
Views:
31
Yes, it is always 1/1/1901.


>Neither of them is optimaziable so speed should be about the same but first is easier to read. I don't see why thaere should be any difference between SQL 2000 and SQL 2005 in this case.
>What's is the date part of the runtime column? Is it some irrelevant constant date?
>
>>Do you know if I am correct in thinking the 1st example will always be faster and both will both work in SQL 2000 and SQL 2005?
>>
>>
>>SELECT * from schedl
>>   where CONVERT(VARCHAR(10),runtime,108) < = '13:12:59'
>>
>>select * from schedl
>>   where runtime - CAST(FLOOR(CAST(runtime AS float)) AS datetime) < = '13:12:59'
>>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform