Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

sanjujeeboy
New Contributor

exclude common records

i have a Table A having 100 ID,

Table B is having 20 ID

my requirement is Table C which should not have 20 ID from Table B

how to acheive this?

10 Replies
keerthika
Contributor II

Re: exclude common records

Hi Sanju,

Do you want to omit these 20 IDs from Table B even if they are present in Table A?

Keerthika

sanjujeeboy
New Contributor

Re: exclude common records

Yes

Re: exclude common records

TableA:

// stuff for table A

TableB:

// stuff for table B

MapTableB:

MAPPING LOAD ID, false() as Flag RESIDENT TableB;

TableC:

LOAD * FROM TableC-Source (options)

WHERE ApplyMap('MapTableB', ID, true());

Best,

Peter

[Edit] Corrected. You want to end-up with 3 tables.

prasad_b
New Contributor

Re: exclude common records

Can u please provide sample data..so it will be easy to solve your problem.

You can use where exist function for same

dathathreya
Contributor

Re: exclude common records

Plz eloborate this as u mentioned that table A having 100 ID's and Table B having 20 ID's ,where in Table C u want to show 100 ID's of A and to exclude Table B means u can use Residant load for Table c.

ahmar811
Contributor III

Re: exclude common records

hi,

If you have table C from separate/different source you can use below script :


TableA:

// stuff for table A

TableB:

// stuff for table B

 

TableC:

LOAD * FROM TableC-Source (options)

WHERE NOT EXITS(ID);



or

If you have table C from table A you can use below script :

TableA:

// stuff for table A

TableB:

// stuff for table B

NoConcatenate 

TableC:

LOAD * RESIDENT TableA

WHERE NOT EXITS(ID);


I hope this will help you


Regards

Ahmar

sanjujeeboy
New Contributor

Re: exclude common records

THE 20 ids FROM TABLE B ARE TO BE REMOVED FROM TABLE A

sanjujeeboy
New Contributor

Re: exclude common records

THE 20 ids FROM TABLE B ARE TO BE REMOVED FROM TABLE A

ahmar811
Contributor III

Re: exclude common records

Please consider my replay in that second scenario will help you in that we will exclude ID which are already present in Table B

Community Browser