Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with dates
Message
De
21/07/2001 00:31:03
 
 
À
17/07/2001 16:32:05
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00531688
Message ID:
00533444
Vues:
7
Be careful that you don't affect performance. Something like this:

WHERE
CONVERT(varchar(10), datecolumn, 112) = '20010531'

may affect performance bacause SQL Server cannot use an index to solve the query. You might want to try something like:

WHERE
datecolumn >= '20010531' AND datecolumn < '20010601'

Just my two cents.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform