I am trying to do the following query with bo… i have already create a odbc connection which i have been using for a couple of years now and i know it works fine… I am trying to do the sql below and when i paste that query in the sql server manager and run it there it runs fine no error
DECLARE @vv varchar(10);
SET @vv = ‘09/1/2014’;
WITH tt AS
(
SELECT *
FROM customSWMcalendar
WHERE datex <= convert(datetime, @vv)
)
select *
from tt
ultimately i want to put a @prompt for the variable @vv… i want the user to be able to pick whatever date they want. Hope anyone can help…
i get the following error in bo
Exception: DBD, [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.State: 42000
fdomond (BOB member since 2014-09-19)