I'm a SQL Server guy and don't query Advantage DB directly very often so am weak on syntax subtleties. Am trying to fetch all charges between two dates and no matter what variations I try it's always some kind of conversion failure or invalid operator for the type.
select * from slips
where SlipDate >= '05/09/2020 12:00:00 AM'
and SlipDate <= '05/15/2020 12:59:59 PM'
I've tried formatting the dates as 2020/05/09 and 2020-05-09, even tried doing a CONVERT to sql_timestamp. Nothing works.
One complicating factor is I'm doing this through a linked server query and quoted strings are a pain with the OPENQUERY() function so if the above is supposed to be working than that'll be important to know.
Thanks for any advice!
-- Craig
select * from slips
where SlipDate >= '05/09/2020 12:00:00 AM'
and SlipDate <= '05/15/2020 12:59:59 PM'
I've tried formatting the dates as 2020/05/09 and 2020-05-09, even tried doing a CONVERT to sql_timestamp. Nothing works.
One complicating factor is I'm doing this through a linked server query and quoted strings are a pain with the OPENQUERY() function so if the above is supposed to be working than that'll be important to know.
Thanks for any advice!
-- Craig
Comment