Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Syntax for dates
Message
 
To
22/08/2006 14:32:31
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01147655
Message ID:
01147659
Views:
17
Frank,

For date literals in SQL Server, put single quotes around your literal value:
...WHERE  edc_dentry = '22/08/2006 00:00:00'
HTH,
Chad


>Hi,
>
>I want to build up an SQL query that runs against SQL Server and turns out like this:
>
>
>SELECT Batches.Bat_batchno,
>       batches.bat_month,
>       batches.bat_year,
>       EDCards.*
>FROM EDCards
>INNER JOIN Batches ON edc_batfk = bat_pk
>WHERE  edc_dentry = 22/08/2006 00:00:00
>
>
>I am getting an "incorrect syntax near '00'" error when I try to run the SQL.
>
>What am I missing?
>
>Thanks.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform