on 2024 Jan 29 3:17 PM
I'm trying to use a WITH statement in SAP Datasphere SQL View. It's coming up with error of
"Mismatched WITH, expecting ‘(’, SELECT"
My script works outside SAP Datasphere, so it's some synatx difference I'm not spotting. The psuedo code I am using is..
My thanks in advance for any assistance
Request clarification before answering.
Have you defined the SQL View as a "SQL Script"?
You can always use variables as in:
Table1 = SELECT "Field1", "Field2", Count(*) AS "Count"
FROM "TABLE1"
WHERE "ActiveFlag"='X'
GROUP BY "Field1", "Field2";
Table2 = SELECT "Field1","Measure1"
FROM "TABLE2"
WHERE "ActiveFlag"='X';
return SELECT
"Table1"."Field1", "Table1"."Field2", "Table2"."Measure1"
FROM :Table1 as "Table1"
LEFT JOIN :Table2 as "Table2"
ON "Table1"."Field1"="Table2"."Field1"
;Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.