Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi please could someone help me with the following question.
I have an excel file that I am loading account numbers into qlikview
The account numbers are 10 digit long numbers and the count of the numbers can change through a user updating the excel file. I would like to store the numbers as follows in a variable . '1234657890', '1234567890', '1234567891' to use later in a where clause for a sql query.
My where clause would be like this.
Where acc No in ($myvariable)
Would this be possible and if so please could someone help me?
Thank you in advance
Hi,
LOAD Concat(@1, ', ') as Main_Account_Id_list
FROM
(
let vlist = Peek('Main_Account_Id_list', 0);
Set vVariable = '1234657890', '1234567890', '1234567891';
in the load statement use
where Match(accNo ,'$(vVariable)');
If you want to save the values dynamically into the variable, you can go with "Let" instead of 'Set'
Thank you for the reply Shiva
Appologies i should have ben clearer in my question
the values that i want to get stored in a variable are loaded in as follows
LOAD @1 as "Main Account Id"
FROM
(
there can be any amount of account id's stored in this excel file. I need the values that are loaded in as "Main Account id" stored in a variable.
thanks in advance
Would you share excel file
For me, this is working
SET Var = '1','2','3';
LOAD * Inline [
Field1 , Field2
Sample, 1
Sample, 2
Sample, 3
Sample,4
] Where WildMatch(Field2, $(Var));
Hi,
LOAD Concat(@1, ', ') as Main_Account_Id_list
FROM
(
let vlist = Peek('Main_Account_Id_list', 0);
Thanks Guys, All your answers were very helpful
If you want to save the values dynamically into the variable, you can go with "Let" instead of 'Set'
LET Won't consider the static text. you may forget. Read this QlikView Addict: SET vs. LET