Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i'm encountering below error when trying to left join same table with same column name at Qlikview load script for oracle sql. How can this be done? I have put T1 and T2 to identify the columns.
TEST:
LOAD
A AS A;
SQL SELECT
T1."A"
FROM "TEST1" T1 left join "TEST1" T2 on T1."A" = T2."A"
where A ="test";
Try something like below
TEST:
LOAD
T1.A AS A1,
T2.A AS A2
FROM
(SELECT "A" FROM "TEST1" WHERE "A" = 'test') T1
LEFT JOIN
(SELECT "A" FROM "TEST1") T2
ON T1.A = T2.A;
I think you may need to add T1. in the where clause:
where T1.A ="test";
-Rob
here is the code. couldn't get it right got the error sql command not properly ended. If i add the bracket as shown above, it will say missing right parenthesis.
FROM
"test1" WHRE To_Char(T1.bb, 'yyyymm') = $(vCurrentYearMonth) T1
LEFT JOIN SELECT "vsl" FROM "test" T2 on T1.vsl= T2.vsl;
here is the code. couldn't get it right got the error sql command not properly ended. If i add the bracket as shown above, it will say missing right parenthesis.
FROM
"test1" WHRE To_Char(T1.bb, 'yyyymm') = $(vCurrentYearMonth) T1
LEFT JOIN SELECT "vsl" FROM "test" T2 on T1.vsl= T2.vsl;
sorry, ive updated to include full syntax. i have the sql syntax
LOAD
A as A,
SQL (SELECT "A" FROM "vsl"
WHRE To_Char(T1.B, 'yyyymm') = $(vCurrentYearMonth) T1
LEFT JOIN SELECT "vsl" FROM "vsl" T2 on T1.A = T2.A;
Try this
LOAD A as A
FROM
SQL (
SELECT "A" FROM "vsl"
WHERE To_Char(T1.B, 'yyyymm') = $(vCurrentYearMonth)
LEFT JOIN
SELECT "vsl" FROM "vsl" T2 on T1.A = T2.A
);