Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left join

Hi, I cannot get this to work and I am not good a writing scripts. How do I get the Left Join to work? How do I write it?

ODBC CONNECT TO EGDTA;

LOAD FKFIRM As FIRMA, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT As Konteringskode, FKLAG, FKSLG As `Sælger`, FKRDGL, FKSPRM As `Pristilsætning`, FKSAGB As Sagsbehandler,"FKLMÅD" As LevMaadeKode, FKVAKT As Varekontering, FKFORS As Forsendelseskode, FKENH;

SQL SELECT FKFIRM, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT,FKLAG, FKSLG, FKRDGL, FKSPRM, FKSAGB, "FKLMÅD", FKVAKT, FKFORS, FKENH FROM BBB.EGDTA.FAKSTAP1

WHERE (FKFKDT BETWEEN 20100701 AND 20100731 or FKFKDT BETWEEN 20110701 AND 20110731) AND not FKPRC = '149' AND not FKPRC = '141' AND FKKCRN = '1' AND not FKKKT = '9';

LEFT JOIN (FAKSTAP1)

ODBC CONNECT TO [MS Access Database;DBQ=C:\Documents and Settings\BBB.AAA\Skrivebord\Skrivebord\QV\QV.accdb];

LOAD FIRMA, FKSAG, Ordredato, Ordre_TID;

SQL SELECT * FROM tbl_Ordrenr;

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

ODBC CONNECT TO EGDTA;

EGDTA:

LOAD FKFIRM As FIRMA, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT As Konteringskode, FKLAG, FKSLG As `Sælger`, FKRDGL, FKSPRM As `Pristilsætning`, FKSAGB As Sagsbehandler,"FKLMÅD" As LevMaadeKode, FKVAKT As Varekontering, FKFORS As Forsendelseskode, FKENH;

SQL SELECT FKFIRM, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT,FKLAG, FKSLG, FKRDGL, FKSPRM, FKSAGB, "FKLMÅD", FKVAKT, FKFORS, FKENH FROM BBB.EGDTA.FAKSTAP1

WHERE (FKFKDT BETWEEN 20100701 AND 20100731 or FKFKDT BETWEEN 20110701 AND 20110731) AND not FKPRC = '149' AND not FKPRC = '141' AND FKKCRN = '1' AND not FKKKT = '9';

ODBC CONNECT TO [MS Access Database;DBQ=C:\Documents and Settings\BBB.AAA\Skrivebord\Skrivebord\QV\QV.accdb];

LEFT JOIN (FAKSTAP1)

LOAD FIRMA, FKSAG, Ordredato, Ordre_TID;

SQL SELECT * FROM tbl_Ordrenr;

try out this if not work then take resident of first table and then left join resident second table

thanks

Sunil Chauhan

Sunil Chauhan

View solution in original post

4 Replies
SunilChauhan
Champion
Champion

ODBC CONNECT TO EGDTA;

EGDTA:

LOAD FKFIRM As FIRMA, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT As Konteringskode, FKLAG, FKSLG As `Sælger`, FKRDGL, FKSPRM As `Pristilsætning`, FKSAGB As Sagsbehandler,"FKLMÅD" As LevMaadeKode, FKVAKT As Varekontering, FKFORS As Forsendelseskode, FKENH;

SQL SELECT FKFIRM, FKPRC, FKKUNR, FKFKDT, FKSAG, FKFKNR, FKAN, FKVAGR, FKVANR, FKFBEL, FKKBEL, FKKMPG, FKKKT,FKLAG, FKSLG, FKRDGL, FKSPRM, FKSAGB, "FKLMÅD", FKVAKT, FKFORS, FKENH FROM BBB.EGDTA.FAKSTAP1

WHERE (FKFKDT BETWEEN 20100701 AND 20100731 or FKFKDT BETWEEN 20110701 AND 20110731) AND not FKPRC = '149' AND not FKPRC = '141' AND FKKCRN = '1' AND not FKKKT = '9';

ODBC CONNECT TO [MS Access Database;DBQ=C:\Documents and Settings\BBB.AAA\Skrivebord\Skrivebord\QV\QV.accdb];

LEFT JOIN (FAKSTAP1)

LOAD FIRMA, FKSAG, Ordredato, Ordre_TID;

SQL SELECT * FROM tbl_Ordrenr;

try out this if not work then take resident of first table and then left join resident second table

thanks

Sunil Chauhan

Sunil Chauhan
Not applicable
Author

Hi Sunil, I have tried it out, and it dosn't work. I havn't tried 'resident'...how do I do that?

SunilChauhan
Champion
Champion

in Place  LEFT JOIN (FAKSTAP1)

use this

LEFT JOIN (EGDTA)

Sunil Chauhan
Not applicable
Author

Hi Sunil, I have found the problem. I loaded the script as Debug and this only returns 10 posts from the first table and 10 posts from the second table. I needed to do a total refresh to see it working. Thank you for your help.