Board index » delphi » Date type in Paradox table with SQL query

Date type in Paradox table with SQL query

I have a (D)ate type field in a paradox table.

I use the following query:

select * from "c:\data\bon.db" where date="6-7-1999"

It return a type mismatch.

What am I doing wrong?

Thanks,

Roland

 

Re:Date type in Paradox table with SQL query


Try

    select * from "c:\data\bon.db"
    where TheDate = "6/7/1999"

instead.  The slashes in the date instead of the hyphens will work, and it's
not good to use a reserved word like "Date" for a fieldname.

Hope this helps...

Roland M. Guyt <Rol...@StaySane.nl> wrote in message
news:37BB186C.9D1A4B91@StaySane.nl...

Quote
> I have a (D)ate type field in a paradox table.

> I use the following query:

> select * from "c:\data\bon.db" where date="6-7-1999"

> It return a type mismatch.

> What am I doing wrong?

> Thanks,

> Roland

Other Threads