Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Join & exclude

Hi Experts

I have 2 Tables. One Field contains a lot of data. therefore I would like to load only port of the data. Thus I joined the tables to exclude part of the data:

Text:

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Notiz:

left Join (Text)

SQL SELECT

  notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ is = 258;

Problem is, "memofeld" is still loaded completely with 1 Mio datasets. I would only like to load entries where notiz_typ is = 258.

Anybody know a solution?

Thank you for your help!

Jan

9 Replies
Highlighted

Hi,

try like,

Text:

SQL SELECT

  notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ is = 258;

left join

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Not applicable

Hm, that one does not work yet...

Highlighted
MVP & Luminary
MVP & Luminary

Hi,

Use inner join

Text:

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Notiz:

Inner Join (Text)

SQL SELECT

  notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ is = 258;

Regards,

Jagan.

Highlighted
Master III
Master III

You can do the join in Sql

Text:

SQL SELECT

te.txtnr,

te.memofeld,

nz.notnr,

nz.art,

nz.thema,

nz.notiz_typ

FROM EASY.texte te, EASY.notiz nz

Where te.txtnr = nz.txtnr and nz.notiz_typ is = 258;

Or Use Inner join

Text:

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Notiz:

Inner Join (Text)

SQL SELECT

  notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ is = 258;

Highlighted
Not applicable

I like the inner join, but it does not work. I still load all datasets from memofeld...

Highlighted
Specialist II
Specialist II

try the bellow scripts..

Option-1:

Notiz:

SQL SELECT

notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ = '258';

Inner Join (Notiz)

Text:

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Highlighted
Master III
Master III

Check if you have spaces in field txtnr. You can also try inner join in Sql

Highlighted

Hi,

Did is = work properly?

just try with =

Text:

SQL SELECT

  notnr,

art,

thema,

notiz_typ,

txtnr

FROM EASY.notiz where notiz_typ = '258';         

left join

SQL SELECT

txtnr,

memofeld

FROM EASY.texte;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Not applicable

Hi,

Try this as per below example...

SoDetails:

LOAD

VBELN AS SalesOrder,

POSNR AS SalesOrderItem,

GBSTA AS SalesOrderStatus,

KUNNR AS SalesOrderCustomer;

SQL SELECT VBUP~VBELN, VBUP~POSNR, VBUP~GBSTA, VBAK~KUNNR FROM

VBUP LEFT JOIN VBAK ON VBUP~VBELN = VBAK~VBELN

WHERE VBUP~GBSTA = 'A';