Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server DateTime in SQL Select
Message
De
10/05/2010 11:05:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01463837
Message ID:
01463955
Vues:
30
>>>>then that would be a problem. Period.
>>>>
>>>>Cetin
>>>
>>>But this is not the result I want.
>>>
>>>Ok, I ask you now to write me a query to return all records for today's date. Please write it using BETWEEN operator. My dates are stored with time portion.
>>>
>>>Thanks in advance,
>>
>>
>>dStart = date()
>>dEnd = date()+1
>>
>>select * from myTable where myDateTime between ?m.dStart and ?m.dEnd and myDate < ?m.dEnd
>>
>>Cetin
>
>I knew it in advance. You're still using 2 operators, not between only, so it's the same as
>
>myDateTime >= ?m.dStart and myDate < ?m.dEnd --which confirms my point.
>
>End of discussion.

Yes since you created the discussion in the first place with your own restrictions you have the right to confirm and end it:)
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