Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hm, that one does not work yet...

jagan
Luminary Alumni
Luminary Alumni

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.

anbu1984
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;

Not applicable
Author

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

PradeepReddy
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;

anbu1984
Master III
Master III

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

PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

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';