Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

writing left join query











Hi,

my query is this:

select

VBAP~ABGRU

VBAP~FAKSP

VBPA~VBELN

VBPA~PARVW

VBPA~KUNNR

VBPA~ABLAD

VBPA~POSNR

from

VBAP left join VBPA on ( VBAP~VBELN = VBPA~VBELN )

where

VBAP~ERDAT =< '$(varDate)' and VBAP~PSTYV in ('JTAP' , 'ZFOR' , 'REN' , 'ZCOO' , 'ZLAO' , 'ZREN' , 'ZSUB' , 'ZSUM') ;

I requires left join , and i want to also apply condition on VBPA table that VBPA~PARVW in ('RE' , 'WE')

while applying getting SQL error





1 Reply
Not applicable
Author

Hi,

As per your query you want to make left join between VBAP and VBPA on the basis of key VBAP~VBELN = VBPA~VBELN.

I will suggest to transforn this query in qlikview.Plz make qvd for both the tables require then you can write in this manner,

VBAP:

Load

VBAP~ABGRU,

VBAP~PSTYV,

VBAP~VBELN as Key,

VBAP~ERDAT ,

VBAP~FAKSP

From .....VBAP.qvd where

VBAP~ERDAT =< '$(varDate)' and match(VBAP~PSTYV ,'JTAP' , 'ZFOR' , 'REN' , 'ZCOO' , 'ZLAO' , 'ZREN' , 'ZSUB' , 'ZSUM');

Left join

VBPA~VBELN as Key,

VBPA~PARVW,

VBPA~KUNNR,

VBPA~ABLAD,

VBPA~POSNR

From ....VBPA.qvd

Regards,

Ravi