Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
In my dashboard, i am fetching data from OLEDB source. Now, there is a Field "BusinessGroup" in databse.
Now if BusinessGroup = 'ABC%' Then ABC else fetch Desk field values from flat file.
How can i do this in script??
Hi Nikhil!
If I understood you correctly, you have some key field in table.
You may do this:
t1:
mapping load
keyfield,
businessgroup
from <your local file>;
oledbtable:
load
keyfield,
if(BusinessGroup='ABC%','ABC',applymap('t1',keyfield,null()) as BusinessGroup;
sql select
keyfield,
businessgroup
from <your oledb source>;
hi,
Send sample of script.
you can use like
LOAD *;
select sql *
from oracle.tablename where BusinessGroup like( 'ABC%');
Regards
Vimlesh
Can you be more collaborative?
Hi Nikhil!
If I understood you correctly, you have some key field in table.
You may do this:
t1:
mapping load
keyfield,
businessgroup
from <your local file>;
oledbtable:
load
keyfield,
if(BusinessGroup='ABC%','ABC',applymap('t1',keyfield,null()) as BusinessGroup;
sql select
keyfield,
businessgroup
from <your oledb source>;
Well sample is like:
OLEDB connection ;
LOAD A,
B,
C,
D,
if(E LIKE 'DCM%' , 'DCM' , (have to fetch Desk field value from excel sheett));
Select......
Thanks
Well sample is like:
OLEDB connection ;
LOAD A,
B,
C,
D,
if(E LIKE 'DCM%' , 'DCM' , (have to fetch Desk field value from excel sheett));
Select......
Thanks
Try this:
LOAD
if([BusinessGroup] like 'ABC*', 'ABC', [Desk]) as "FIELD",
FROM.....
First load the data from database as well as Flat file in Qlik.
Left join or join the both based on the Key and then derive the column as
if (left(BusinessGroup,3) = 'ABC' ,ABC , Desk) as New Filed
Hey,
I tried your way but prob is i am loading like:
Load Table A(having business group filed)
Left Join
Load Table B(having Desk field).
So your statement is not working fine as throwing exception Desk field not found:
if (left(BusinessGroup,3) = 'ABC' ,ABC , Desk) as New Filed
hi,
you want to create a field or filter only ABC related data.
use wildmatch function.
Regards
Vimlesh