Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query All Odd Days in a DateTime Field
Message
 
 
À
25/01/2009 08:51:12
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01376540
Message ID:
01376854
Vues:
12
>>select case when DAY(EventTime)%2 =0 then 1 else 0 end as Even from CommunicationLog
>
>Interesting, I tried using DAY() and it returned an error that it couldn't be used....which is why I posted.

Strange, worked for me in SQL 2008

select * from CommunicationLog where DAY(EventTime)%2 =0

where did you try this type of query?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform