Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
chauhans85
Esteemed Contributor

Left join

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

4 Replies
chauhans85
Esteemed Contributor

Left join

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

Not applicable

Left join

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

chauhans85
Esteemed Contributor

Left join

in Place  LEFT JOIN (FAKSTAP1)

use this

LEFT JOIN (EGDTA)

Not applicable

Left join

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.

Community Browser