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: 
elaiken3
Contributor II
Contributor II

Excluding Deal IDs from from being loaded in a table using an excel file connection

Hello,

I need some help figuring out how to exclude certain rows from being loaded based on their deal ids.  I have an excel file with a list of deal ids that should be excluded from being loaded in my main tables. The deal ids that I want excluded from being loaded in TABLE1 are in the Exception Table. Here's how it looks

Exception:
LOAD
DEAL_ID as "DEAL_ID_EXCEPTION"
FROM [lib://DEAL_ID_TEST_Deals]
(ooxml, embedded labels, table is UAT);

 

TABLE1:

LOAD

deal_id, region, project_name, title;

SQL select cobs_id, region, project_name, title

from deal_db.template_deal

I want to load ONLY the deal ids that are not in the Exception table. Any help would be greatly appreciated

Labels (2)
5 Replies
Anil_Babu_Samineni

Perhaps this?

Exception:
LOAD
DEAL_ID as "DEAL_ID_EXCEPTION"
FROM [lib://DEAL_ID_TEST_Deals]
(ooxml, embedded labels, table is UAT);

TABLE1:

LOAD

deal_id, region, project_name, title Where Not Exists (DEAL_ID_EXCEPTION);

SQL select cobs_id, region, project_name, title

from deal_db.template_deal

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
elaiken3
Contributor II
Contributor II
Author

It gave me this error

The following error occurred:
Field 'DEAL_ID_EXCEPTION' not found
Anil_Babu_Samineni

My bad, Reverse

TABLE1:

LOAD

deal_id, region, project_name, title;

SQL select cobs_id, region, project_name, title

from deal_db.template_deal;

Exception:
LOAD
DEAL_ID as "DEAL_ID_EXCEPTION"
FROM [lib://DEAL_ID_TEST_Deals]
(ooxml, embedded labels, table is UAT) Where Not Exists (DEAL_ID_EXCEPTION);

More Info : https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/InterRecordFun...

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
elaiken3
Contributor II
Contributor II
Author

That ran all the way through but didn't give the desired result of excluding the rows in TABLE1 that correspond to the IDs in DEAL_ID_EXCEPTION

Anil_Babu_Samineni

Please provide sample data set.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful