Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Creating flags between 2 tables

Hi,

I have two tables and comparing both I need to create flags, Like

Qvd1:

Column1,Column2;

Qvd2:

Column3,Column4;

Qvd3:

if(Qvd1.Column1=Qvd2.Column2,'n','y') as Test_Flag;

3 Replies
ariel_klien
Specialist
Specialist

Hi,

You can try Join the 2 tables:

Table:

load Column1,

        Column2

from Qvd1

join

load Column3 as Column1,

        Column3,

        Column4

from Qvd2;

FlagTable:

load *,

        if(Column1=Column3,'n','y') as Test_Flag

resident Table;

Drop table Table;

BR 

Ariel

Not applicable

Hi Priya,

find the attachment.

sunny_talwar

You can try this in addition to Ariel.klien answer

Table1:

LOAD [Column 1],

          [Column 2]

FROM QVD1.qvd;

Table2:

LOAD [Column 3],

          [Column 4],

FROM QVD2.qvd;

Join (Table2)

LOAD [Column 3],

          1 as Flag

Resident Table2

Where Exists([Column 1], [Column 3]);

HTH

Best,

S