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:56:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01322704
Message ID:
01322932
Vues:
24
>>>This one works
>>>
>>>
>>>SELECT COUNT(*)
>>>FROM [dbo].[log]
>>>WHERE action = 'THIS' AND log_date_time BETWEEN
>>>    '2008/01/01' AND '2008/03/31'
>>>
>>>
>>
>>I didn't say it wouldn't. I said it is not the right way to do that.
>>Cetin
>
>Cetin,
>
>But I was wondering, is there a method that would work for either VFP database or SQL Server without having to maintain two different approaches?

Yes, use parameters:) That is a single codebase approach and yet safe.
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