Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI team,
I am new to qlik view tool ..in my daily my sql Query i will be using and & or condition
for example
sql: select * from table1
where (saleschannel = 'CORPORATE' AND (bookingsource='CORPORATE' OR bookingsource != 'ONLINE')
guys have any idea..how to use in the tool
Hi,
You can try wildMatch() this way
if(WildMatch(TicketSalesChannel,'CORPORATE') and WildMatch(TicketBookingChannel,'CORPORATE'),'Agents',
if(WildMatch(TicketSalesChannel,'WEBSERVICE','PAYMENTPARTNER'),'Partners')) as takecategorydeatils
Regards,
In the script you can use the SQL statements?
Kindly explain where exactly you want to use the above?
you are missing a parenthesis:
select * from table1
where (saleschannel = 'CORPORATE' AND (bookingsource='CORPORATE' OR bookingsource != 'ONLINE'))
HI Kalyan,
In qlikview also we are using AND, OR operator only and for not equal to instead of != this QV supports <> symbol.
Hope this will solve your problem. Still if are facing any issue let us know.
Dear Kalyan,
Please refer the attached qvw.
Hi,
If you are using in script level then do like this way,
select * from table1
where saleschannel = 'CORPORATE' AND (bookingsource='CORPORATE' OR bookingsource <> 'ONLINE')
Or
select * from table1
where (saleschannel = 'CORPORATE' AND (bookingsource='CORPORATE' OR bookingsource <> 'ONLINE'))
Regards,
Hi kalyan,
You Can Use same 'and' ,'Or' in qlikview same as SQL.
For Ex your stmt
Load * from table.qvd
where saleschannel = 'CORPORATE' and (bookingsource='CORPORATE' Or bookingsource <> 'ONLINE') ;
Hope it Helps
Regards,
Koti
guys thanks for the help ..i have kept question in wrong way i think ..i am just sharing code
code Example :
Load *,
if(WildMatch(TicketSalesChannel,'CORPORATE'),'Agents',
if(WildMatch(TicketSalesChannel,'WEBSERVICE','PAYMENTPARTNER'),'Partners',)) as takecategorydeatils
from temp_tickets.qvd
for the above script
i want to add one more condition like
load *
if(WildMatch(TicketSalesChannel,'CORPORATE' and TicketBookingChannel,'CORPORATE'),'Agents',
if(WildMatch(TicketSalesChannel,'WEBSERVICE','PAYMENTPARTNER'),'Partners',)) as takecategorydeatils
from temp_tickets.qvd
is it possible
kalyan
Please find the attachment
Hi,
You can try wildMatch() this way
if(WildMatch(TicketSalesChannel,'CORPORATE') and WildMatch(TicketBookingChannel,'CORPORATE'),'Agents',
if(WildMatch(TicketSalesChannel,'WEBSERVICE','PAYMENTPARTNER'),'Partners')) as takecategorydeatils
Regards,