Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use dates in WHERE in SQL Server
Message
From
10/06/2008 16:56:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/06/2008 16:51:01
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01322704
Message ID:
01322932
Views:
23
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform