Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Silly question this one.
Please paste the below code in an empty QlikView file. My Code fails on the 'Match' statement. I need some assistance to get this to work please, and I've tried all options I can think of.
Thank you
Tbl:
load
chr(40) & concat(Code, ',') & chr(41) as Codelist;
LOAD * INLINE [
Code
28
29
30
];
Let MyVar = FieldVAlue('Codelist',1);
drop table Tbl;
DemoData_1:
LOAD * INLINE [
Student, Code
Peter, 28
Pam, 88
Paul, 30
];
DemoData:
NoConcatenate load
*
Resident
DemoData_1
where match(Code, $(MyVar)) > 0 ; //this is where it fails - I've also tried $(MyVar), with no luck - it runs, but returns nothing
drop table DemoData_1;
exit SCRIPT
your variable after the first styatement is (28,29,30)
maybe with
where Index('$(MyVar)', Code)
Try '$(MyVar)'
Otherwise, run it in debug mode and see if the variable is assigned correctly in the first place.
your variable after the first styatement is (28,29,30)
maybe with
where Index('$(MyVar)', Code)
Thank you - this works!