on 2023 Aug 08 10:36 AM
Hi,
I have tried to use With Statement in Datasphere with success.
Is it even possible to use CTE in Datasphere?
Has anyone tried it?
What alternative or workaround would you recommend?
Request clarification before answering.
Hi Soburat,
a) If you are using SQLScript then you should define a local table variable instead of using a CTE, for example this would be valid
lt_table = SELECT '1' as "TEST" FROM DUMMY;
SELECT "TEST" FROM lt_table;
b) If you are using regular SQL then you cannot use variables, meaning you need to do everything in subselects, e.g.:
SELECT "TEST" FROM (SELECT '1' as "TEST" FROM DUMMY);
Hope I could help.
Regards,
-Irvin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
6 | |
6 | |
6 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.