You can translate the question and the replies:

Common Table Expression (CTE) getting an error

Hi, i'm converting my CTE codes from SQL server to Denodo/VQL but i'm getting an error it say "QUERY VIRTUAL ERROR". I have a multiple CTE's in my script but when i use a left join in my final query using the result of CTE i'm getting an error and some field column T1 could not identified but if i removed the left join the script is working. THank you. ``` with CTE as (select * from sample1 ), CTE2 as ( select * from CTE ) , CTE3 as ( select * from CT2 ), CTE4 as ( select * from sample3 ) select from CTE4 t1 left join cte3 t2 on t1.item=t2.item ```
04-09-2017 03:06:08 -0400

1 Answer

Hi, The error "field column T1 could not identified" occurs when the column name does not exist in the view. When I executed the similar query, I specified the column name as it is in the view and it worked for me perfectly with Left join, Inner join, Right join. Besides that, in Virtual DataPort ensure your data source supports Left join by checking the properties in Source configuration (Data source > Edit). For more information related to Source Configuration refer the section[ Data Source Configuration Properties]( in Virtual DataPort Administration Guide and refer the section [WITH Clause]( in Virtual DataPort VQL Guide for the syntax to implement Common table expression. Hope this helps.
Denodo Team
05-09-2017 09:01:20 -0400
You must sign in to add an answer. If you do not have an account, you can register here