Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving date and time and getting date
Message
De
24/02/2010 06:55:54
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01450712
Message ID:
01450722
Vues:
43
thank you...

>SQL Server does not support index on expressions.
>
>ltDtStart = DTOT(xmydate)
>ltDtEnd = DTOT(xmydate+1)
>...
>  WHERE mydate >= ?ltDtStart AND mydate < ?ltDtEnd
>...
>
>
>
>>
>>I will create a datetime field. I'll save date and time to it. I need date and time and have filtering just date part. Should I create an index like;
>>
>>CONVERT(char(10),mydate,112)
>>
>>and use;
>>vfp:
>>xmydate=dtoc(date(),1)
>>sql server:
>>where convert(char(10),mydate,112)=?xmydate
>>
>>for performance
>>
>>or is just an index with mydate is enough for performance;
>>
>>vfp:
>>xmydate=date()
>>sql server:
>>where mydate=?xmydate
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform