Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist
Specialist

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 (5)
1 Solution

Accepted Solutions
Taoufiq_Zarra
Master II
Master II

@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
Master II
Master II

@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

ramchalla
Creator
Creator

@cbaqir ,  please include the below in where condition

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

cbaqir
Specialist
Specialist
Author

I tired this but it didn't work.

cbaqir
Specialist
Specialist
Author

I tried this but it didn't work.

marcus_sommer
MVP & Luminary
MVP & Luminary

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