Incorrect syntax near the keyword 'WITH'.
Completed
Hi.
I have an SQL query using keyword WITH.
If I use this query to create a view, Yellowfin gives the error used for this title. However, if I use the same query to create a report or a Transformation Flow, Yellowfin says the query is valid.
Can you help me understand the problem?
Thank you.
The query is something like this (name of the tables and names of the attributes were modified):
WITH D AS ( select no, de, convert(datetime, date1, 103) as ate1, convert(datetime, date2, 103) as ate2, first, last, ti from table1), PWS AS ( select erId, onId, er, te, ode, tion, nd from table2), L AS ( select id, ice from table3), SE AS ( select eid, id, ate from table4), GSE AS ( select ueId, rade from table5) select top (100) D.no, D.de, D.ate1, D.ate2, D.first, D.last, D.ti, PWS.te, PWS.ode, PWS.tion, L.ice, SE.ate, GSE.rade from D left join PWS on PWS.er = D.no COLLATE Latin1_General_CI_AS left join L on L.id = PWS.onId left join SE on SE.id = PWS.erId left join GSE on GSE.ueId = SE.eId where PWS.te not like '%something1%' and PWS.nd = 'something2' and D.ate2 is not null and CONVERT(datetime, D.ate2, 103) >= CONVERT(DATETIME, '01-01-1960 00:00:00', 103) and PWS.te not like '%aomething3%' order by D.ate2 desc
Hi Tiago,
No worries!
If there's nothing else I'll mark this ticket as complete and we can track progress of the enhancement from the other post.
Let me know.
Kind regards,
Chris
Hi Tiago,
No worries!
If there's nothing else I'll mark this ticket as complete and we can track progress of the enhancement from the other post.
Let me know.
Kind regards,
Chris
Hi Tiago,
Thanks for contacting Yellowfin. As you're posting from an @gmail address, unfortunately it hasn't filled in which organisation you work for. Can you let me know?
Bear in mind that CTEs like the WITH statement are not supported in freehand SQL views at this time, but it may be implemented at a later date.
Kind regards,
Chris
Hi Tiago,
Thanks for contacting Yellowfin. As you're posting from an @gmail address, unfortunately it hasn't filled in which organisation you work for. Can you let me know?
Bear in mind that CTEs like the WITH statement are not supported in freehand SQL views at this time, but it may be implemented at a later date.
Kind regards,
Chris
Replies have been locked on this page!