Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server DateTime in SQL Select
Message
De
10/05/2010 05:51:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01463837
Message ID:
01463918
Vues:
54
>>>>Don't worry. Using BETWEEN, SQL server doesn't have a problem with datetime values and it doesn't have a problem with the time portion either. It is VFP that does have a problem with time portion.
>>>>Cetin
>>>
>>>Why do you say that? Please read carefully Aaron Bertrand's blog I gave in my other message.
>>
>>Because it is like that. I wouldn't read, it is a long writing. Would you instead tell me where does it say SQL server has problem using between with datetime values or it has a problem with the time portion.
>>Cetin
>
>If you have a datetime field in SQL Server and you want to ensure that time portion of the particular date is included in the result set, then the only way to select the information would be
>
>select * from myTable where DateField >=@StartDay and DateField < @EndDay + 1
>
>Otherwise there is a risk of losing some values due to time precision.
>
>Aaron Bertrand's blog (short one) explains it very clearly - take a read, you would not regret.

You once again, constructing a sentence that is impossible for me to understand. I said I wouldn't spend time reading, just show me the lines where it supports your claim that SQL server datetime fields lose their time portions when retrieved using Between.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform