DATAlink error on update

Generic selectors
Exact matches only
Search title only
Search in content
Search in all posts
Search in pages
Answers
Questions
234 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

Asked question