Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use dates in WHERE in SQL Server
Message
De
10/06/2008 16:55:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01322704
Message ID:
01322931
Vues:
15
Well I would repeat, don't build a string. Pass as a parameter. Why "has to be"?
Cetin

>Thank you, Cetin. Since I am creating a sting that has to be passed with Date value built-in, I changed my code to convert the Date variable to a string using DTOS().
>
>>No! This is the wrong way IMHO.
>>
>>
>>mDateVar = date(2008,6,1)
>>cSqlCommand = "select * from mytable where myDateTimeField >= ?m.mDateVar"
>>
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform