Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have field called f_Acct which contains around 1000 values before loading the FACT table from a database.
Load *,
where exists(f_Acct,ACCT);
SQL Select Column1,
Column2,
ACCT
From Account_Table;
Instead of using the exists in the Qlikview load statement I want make use of the same in the SQL Statement. As the SQL load all the data from the Account_Table and then we filters the values in the Preceding load using exists which having performance issue. Please help!
If I pass the variable in the SQL without single quotes($(vList)) then it is not fetching any records. If I pass the single quotes ('$(vList)') then it is throwing error. Can you please help?
Error("string literal too long" means your string is more than 4000 chars. It seems all the accounts are clubbed into one string. Check the value of $(vList)
It contains all the values with comma seperated. This is what should be passed into the SQL IN clause right?
vList='xyz','trt','rte','ete'
By the way should I pass single quotes while passing the variable in the SQL or not?
Yes
Hello,
You can try using exists() function instead of IN.
Load
*;
Sq
select f_Acct_orig from
YourTable i1
join
(select 408007421 as f_Acct union all
select 407039314 union all
select 409691748 union all
select 407741572 union all
select 605662536 union all
select 407773540 union all
select 407759193) i2 on i1.f_Acct_orig = i2.f_Acct
l
The best way to do this is as above. Transform your id's into select .... union all format...and then keep the variable with that value..and use like above.
Thanks.
Angad
If I pass single quotes I am getting the below error. Please suggest
"string literal too long"
Try with few accounts say less than 10 in vList and check if you get the result.