Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to convert this sql query in a load script:
SELECT
CGANA00F.CONTCA AS C_DESTINATARIO_TEMP,
CGANA03F.ITSTAD AS C_PUNTO_VENDITA_TEMP
FROM CGANA00F
LEFT OUTER JOIN CGANA03F ON
CGANA00F.CDDTCA = CGANA03F.CDDTAD AND
CGANA00F.CONTCA = CGANA03F.CONTAD
WHERE
CGANA03F.ITSTAD <> ' '
here my try:
TAB_1:
LOAD CONTCA AS C_DESTINATARIO_TEMP,
CDDTCA AS key_J ;
//FROM [..\QVD_EME\CGANA00F.QVD] (qvd);
SELECT * FROM CGANA00F;
LEFT JOIN LOAD
CONTAD AS C_DESTINATARIO_TEMP,
ITSTAD AS C_PUNTO_VENDITA_TEMP,
CDDTAD AS key_J ;
SELECT * FROM CGANA03F
// FROM [..\QVD_EME\CGANA03F.QVD] (qvd)
WHERE ITSTAD <> ' ' ;
DROP FIELD key_J;
but it doesn't work ...
Can you help me?
HI,
Try this.
Data:
Load
CONTCA
Autonumber(CONTCA &'/'& CDDTCA) as Key
From CGANA00f.qvd
Left outer join
Load
ITSTAD
Autonumber(CONTCA &'/'& CDDTCA) as Key
From CGANA03f.qvd
Where ITSTAD <> ''
Regards,
Kaushik Solanki
i TRIED WITH THIS SCRIPT BUT IT DOESN'T WORK:
TAB_1:
LOAD CONTCA AS C_DESTINATARIO_TEMP,
AUTONUMBER(CDDTCA&'-'&CONTCA) AS CHIAVE_J ;
//FROM [..\QVD_EME\CGANA00F.QVD] (qvd);
SELECT * FROM CGANA00F;
JOIN LOAD
ITSTAD AS C_PUNTO_VENDITA_TEMP,
AUTONUMBER (CDDTAD&'-'&CONTAD) AS CHIAVE_J;
SELECT * FROM CGANA03F
// FROM [..\QVD_EME\CGANA03F.QVD] (qvd)
WHERE ITSTAD <> ' ' ;
DROP FIELD CHIAVE_J;
HI,
The script i said will work only if you will fetch data from qvd.
If you try to use the same for directly database it will not work.
Regards,
Kaushik Solanki
I beg your pardon ... but why it doesn't work on sql and it works on qvd?
Hi,
Cause the script we wrote is specific to qlikview. The working of QlikView and Database is diff. Load statement is unknown for database.
Regards,
Kaushik Solanki
I tried your solution with the qvd as well and with autonumber (obviosly I had to use just the left joint .... but i think it's the same of left outer join)
The problem is ... is still doens't work ....
The sql query and load script give me two different results ....
Yes indeed before I have used the load of a select ...
Hi,
I would say if you can do the joining at database level, (meaning write sql with join to get the data.) do it there only. Cause QlikView might give you performance issue if the data is huge.
Regards,
Kaushik Solanki
iF i CANNOT GET THE SAME RESULT WITH THE QLIKVIEW SCRIPT AS WITH THE SQL QUERY I MUST FOLLOW YOUR ADVICE .
THANKS FOR YOUR HELP!