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: 
cbaqir
Specialist II
Specialist II

Where statement excludes multiple items from QVD

I am having an issue with getting my script to correctly exclude two different things from the data load. Is there something wrong with my syntax? :

Fired:
LOAD EXP,
FIRING_RECORD,
EXP & '-' & RULE as %KEY_DOMAIN_RULE, //join to Rule table
RULE,
ALERT_DT_TM,
date(TRX_DATE, 'MM/DD/YYYY') as TRX_DATE,
RULE & '-' & date(MonthName(TRX_DATE),'MM-YY') as %KEY_RULE_TRX_DATE,
TRX_TIME,
ALERT,
FACILITY,
POSITION,
NURSE_UNIT,
ENCNTR_PRSNL_RELTN,
ALERT_RECIPIENT
FROM
[..\QVD\01_Extract_QVD\Fired.qvd]
(qvd)
where not WildMatch(POSITION, '*PFS*') and not WildMatch(ALERT,'*PT_CARE_DONOR_NETWORK*');

Labels (2)
1 Solution

Accepted Solutions
Taoufiq_Zarra

@cbaqir  and if ?

Fired:
LOAD EXP,
FIRING_RECORD,
EXP & '-' & RULE as %KEY_DOMAIN_RULE, //join to Rule table
RULE,
ALERT_DT_TM,
date(TRX_DATE, 'MM/DD/YYYY') as TRX_DATE,
RULE & '-' & date(MonthName(TRX_DATE),'MM-YY') as %KEY_RULE_TRX_DATE,
TRX_TIME,
ALERT,
FACILITY,
POSITION,
NURSE_UNIT,
ENCNTR_PRSNL_RELTN,
ALERT_RECIPIENT
FROM
[..\QVD\01_Extract_QVD\Fired.qvd]
(qvd)
where  WildMatch(POSITION, '*PFS*')=0 and WildMatch(ALERT,'*PT_CARE_DONOR_NETWORK*')=0;
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

5 Replies
Taoufiq_Zarra

@cbaqir  and if ?

Fired:
LOAD EXP,
FIRING_RECORD,
EXP & '-' & RULE as %KEY_DOMAIN_RULE, //join to Rule table
RULE,
ALERT_DT_TM,
date(TRX_DATE, 'MM/DD/YYYY') as TRX_DATE,
RULE & '-' & date(MonthName(TRX_DATE),'MM-YY') as %KEY_RULE_TRX_DATE,
TRX_TIME,
ALERT,
FACILITY,
POSITION,
NURSE_UNIT,
ENCNTR_PRSNL_RELTN,
ALERT_RECIPIENT
FROM
[..\QVD\01_Extract_QVD\Fired.qvd]
(qvd)
where  WildMatch(POSITION, '*PFS*')=0 and WildMatch(ALERT,'*PT_CARE_DONOR_NETWORK*')=0;
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ramchalla
Creator II
Creator II

@cbaqir ,  please include the below in where condition

Where not ( WildMatch(POSITION, '*PFS*')
and WildMatch(ALERT,'*PT_CARE_DONOR_NETWORK*'));

cbaqir
Specialist II
Specialist II
Author

I tired this but it didn't work.

cbaqir
Specialist II
Specialist II
Author

I tried this but it didn't work.

marcus_sommer

Some example records would be helpful - which one should be included and which excluded. Maybe the concat of the conditions should be AND else OR or XOR or maybe any combination of them.

- Marcus