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: