DATAlink error on update

2.25K viewsDataLinkData Link dataupdate
0

Dear Support,
I’m facing an issue when doing an update or edit of a DataLink.
When select create DataLink with the same Query everything is OK
I’m using Quantrix Modeler 6.4.1, sqljdbc4 (com.microsoft.sqlserver.SQLServerDrive) and the query is:
WITH Dates AS (
SELECT CONVERT(DATE, ‘2014-04-01’) as [Date]
UNION ALL
SELECT DATEADD(MONTH, 1, [Date])
FROM Dates
where Date < dateadd(yy, 20, getdate())
)
SELECT [Date] into #tempdate
FROM Dates
OPTION (MAXRECURSION 4000)
Select t.t1,t.t2,d.[Date]
from odb.table t
left join #tempdate on d.[Date] >= t.date1 and d.[Date] <= t.date2
drop table #tempdate
The Error is:
Incorrect syntax near the keyword ‘FROM’.
Please help

bnajdov Asked question December 3, 2019

Latest Questions