Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
sahajaqlik
Contributor

script help

HI all , i have sql scripts, i need to write in qlikview script in where condition, can anyone pleaase help.

 

 


( MOMREGION= 'HTSE' AND DOMAIN_CLASS= 'ZSERIES' AND ( UDT_EVENTTYPE LIKE 'EQQ%' OR UDT_EVENTTYPE IN ('OPSU070I', 'OPSU071I') ) OR MOMREGION= 'HTSE' AND DOMAIN_CLASS=  'ZSERIES' AND UDT_EVENTTYPE IN ('IEF450I', 'IEF451I', 'IEF452I', 'IEF453I' ) AND SUBSET_CLASS= 'BATCH' )

OR

( MOMREGION=  'HTSN' AND DOMAIN_CLASS = 'ZSERIES' AND UDT_EVENTTYPE LIKE 'EQQ%' OR MOMREGION <> 'HTSL' AND DOMAIN_CLASS = 'ZSERIES' AND SUBSET_CLASS= 'CA7' )

OR

( MOMREGION  IN ('HTSA', 'HTSE', 'HTSN') AND SERVICES IN ('HUBEU2', 'HUB FRANCE -HBFR', 'HUBDOH', 'HUBHMT', 'HBME-MULTI-COUNTRY-HUB-GROUP-ONE -OMM', 'HBME-MULTI-COUNTRY-HUB-GROUP-ONE -KWT', 'HBME-MULTI-COUNTRY-HUB-GROUP-ONE', 'HUBPAR', 'HUBHAR', 'HUBHGR', 'HUBHKE', 'HBME-MULTI-COUNTRY-HUB-GROUP-ONE -MNM', 'HUBHIL-DEV', 'HUBUAE', 'HUBHRU', 'HSSHUB', 'HUBHHQ', 'HUBHGB', 'HUBHES', 'HUBHIL', 'HBME-MULTI-COUNTRY-HUB-GROUP-TWO', 'HBME-MULTI-COUNTRY-HUB-GROUP-TWO -BAO', 'HBME-MULTI-COUNTRY-HUB-GROUP-THREE', 'HUBHDE', 'HUBHIT', 'HUBLOH', 'HUBHPL', 'HUBHZA', 'HUBE2B -HNL', 'HUBE2B -HLX', 'HUBHEI', 'HUBHCZ', 'HUBHSW', 'HUBE2B -HBE', 'HUBHD8') AND ( SUBSET LIKE '%BCH' OR SUBSET LIKE '%OWNER' OR SUBSET LIKE '%BCHTTS' ) AND DOMAIN_CLASS = 'ISERIES' AND NOT ORIGIN_OBJECT IN ('SSKEPALV1','SSKEPALV2') OR MOMREGION IN ('HTSA', 'HTSE', 'HTSN') AND ( SUBSET LIKE 'HUB%' AND UDT_ORIGINTYPE = 'Automation Point' OR UDT_GSDTEMPLATE = 'HBUS-GP-HUB-USA' ) AND DOMAIN_CLASS = 'ISERIES' OR MOMREGION IN ('HTSA', 'HTSE', 'HTSN') AND
SUBSET_CLASS LIKE '%BATCH%' AND UDT_ORIGINTYPE = 'Automation Point' AND DOMAIN_CLASS = 'ISERIES' OR MOMREGION IN ('HTSA', 'HTSE', 'HTSN') AND DOMAIN_CLASS = 'ISERIES' AND UDT_DOMAIN IN ('wink003', 'wink006', 'brum000', 'brum001') AND OBJECT_CLASS = 'ROBOT' )

OR

( ( MOMREGION   = 'HTSE' AND NOT COUNTRY = 'CH' AND DOMAIN_CLASS = 'CONTROL-M' ) OR ( MOMREGION  = 'HTSE' AND NOT COUNTRY = 'CH' AND DOMAIN_CLASS like 'CTLM%' ) )

OR

( ( MOMREGION  IN ('HTSA', 'HTSN') AND DOMAIN_CLASS = 'CONTROL-M' ) OR ( MOMREGION IN ('HTSA', 'HTSN') AND DOMAIN_CLASS LIKE 'CTLM%' ) )

OR
( MOMREGION IN ('HTSA', 'HTSE', 'HTSN') AND SERVICES IN ('AOC HUB', 'AUH HUB', 'BKH HUB', 'BSB HUB', 'CBH HUB', 'DAKHUB', 'HASE CN HUB', 'HASE MO HUB', 'HASE SG HUB', 'HBBM HUB', 'HTSO HUB', 'IMO HUB', 'INM HUB', 'JPM HUB', 'MAR HUB', 'MMO HUB', 'MNL HUB','MYH HUB', 'NZM HUB', 'SEL HUB', 'SGH HUB', 'TWM HUB', 'VNM HUB', 'AMH TREATS', 'HASE-CN-TREATS', 'HASE-HK-TREATS', 'HASE-SG-TREATS', 'HBBMTREATS', 'LDN TREATS', 'MNL TREATS', 'NZM TREATS', 'TWM TREATS', 'VNM TREATS', 'TEU-TREATS', 'TIA-TREATS', 'TID-TREATS', 'TME-TREATS', 'HBUS TREATS', 'AMH GSOPS', 'HASE GSOPS', 'INSN LIFE/400', 'MYH SMF', 'HASE HCC SMF', 'AMH REMIND', 'MMO REMIND', 'AMH HCC', 'HASE HCC', 'HBBM HCC', 'AUH ATMP', 'NZM ATMP', 'AMHK IMS', 'ASP-ME-HIE', 'AMH HIE', 'TWM CACS') AND ( SUBSET LIKE '%BCH' OR SUBSET LIKE '%OWNER' OR SUBSET LIKE '%BCHTTS' ) AND DOMAIN_CLASS = 'ISERIES' OR MOMREGION  IN ('HTSA', 'HTSE', 'HTSN') AND SUBSET_CLASS = 'HKBCH' AND UDT_ORIGINTYPE = 'Automation Point' AND DOMAIN_CLASS  = 'ISERIES' )

5 Replies
MVP
MVP

Re: script help

If you are trying to fetch the data directly from the DB, you can use the same SQL query in qlik, like:

SQL SELECT
....
FROM ... WHERE <your condition>;
Highlighted
anushree1
Contributor III

Re: script help

For using IN functionality of SQL in Qlikview please use the below format:

Where MATCH(Field,'Val1','Val2','Val3')

the AND, OR works as is in qlikview along with where as it does with SQL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MVP
MVP

Re: script help

And in addition to what Anushree suggested, you have to change wild character '%' to '*'
sahajaqlik
Contributor

Re: script help

what about LIke and NOT

MVP
MVP

Re: script help

These are supported in qlik as well
Community Browser