Hi all
does anyone know a way to successfully run this syntax in DBPro?
SELECT * FROM Workorders
WHERE (DateReceived BETWEEN #[DateQuery1]# AND #[DateQuery2]#)
AND (ModelNumber LIKE [TextEntry42]);
I've tried multiple ways however it just doesn't seem to like it. It seems to be when i enter the second AND.
Many thanks
Sql Query
Moderator: Neosoft Support
Re: Sql Query
If your date is stored in MySQL format (YYYY-MM-DD) you should be able to query with something like:
SELECT * FROM Workorders
WHERE ((DateReceived > #[DateQuery1]#) AND (DateReceived < #[DateQuery2]#))
AND (ModelNumber LIKE [TextEntry42]);
SELECT * FROM Workorders
WHERE ((DateReceived > #[DateQuery1]#) AND (DateReceived < #[DateQuery2]#))
AND (ModelNumber LIKE [TextEntry42]);
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
Re: Sql Query
Usando DateRec.. con formato dd/mm/yyyy, funciona para mi.
Ussing DateRec.. with format dd/mm/yyyy, works for me.
Ussing DateRec.. with format dd/mm/yyyy, works for me.
COSTA RICA
PURA VIDA
PURA VIDA
Re: Sql Query
Disculpe/Sorry
Esto es lo correcto/This is the correct
Usando DateRec.. con formato yyyy/mm/dd, funciona para mi.
Ussing DateRec.. with format yyyy/mm/dd, works for me.
Esto es lo correcto/This is the correct
Usando DateRec.. con formato yyyy/mm/dd, funciona para mi.
Ussing DateRec.. with format yyyy/mm/dd, works for me.
COSTA RICA
PURA VIDA
PURA VIDA
Re: Sql Query
Thanks for the answers guys although i did manage to solve the issue earlier today. The format was MS Access Date.
Inside the DbpExecSQL dialog window:
SELECT * FROM WorkOrders WHERE
DateReceived BETWEEN #[DateQuery1]# AND #[DateQuery2]#
AND ModelNumber LIKE "[TextEntry42]"
This works just fine, thanks again for the info.
Inside the DbpExecSQL dialog window:
SELECT * FROM WorkOrders WHERE
DateReceived BETWEEN #[DateQuery1]# AND #[DateQuery2]#
AND ModelNumber LIKE "[TextEntry42]"
This works just fine, thanks again for the info.