Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Master
Master

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

@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

Highlighted
Creator
Creator

@cbaqir ,  please include the below in where condition

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

Highlighted
Specialist
Specialist

I tired this but it didn't work.

Highlighted
Specialist
Specialist

I tried this but it didn't work.

Highlighted
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