Discussion Board for collaboration on QlikView Scripting.
I'm trying to fetch the required records using where condition in the script.
Please lemme know whether the syntax i'm using is accurate or not.
Where Name='A' and (Zone='1' or Zone='2' or Zone='3' or Zone='9') and Name='B' and (Zone='12' or Zone='24' or Zone='37');
Go to Solution.
That looks as if it will never return anything as Name will never equal 'A' and equal 'B'.
A complete guess here as to what your requirements are but this would probably return some rows :
( Name='A' and (Zone='1' or Zone='2' or Zone='3' or Zone='9') )
( Name='B' and (Zone='12' or Zone='24' or Zone='37') );
There were many Zone values under Names A and B
I wanna return values only Zone = 1,2,3,9 from A
Zone = 12, 24, 37 from B.
Can i use the same logic for multiple parameters like Name C, D. ..etc..?
Can i use Zone='1*' to fetch all the zonez starting with 1????
It could look neater with the Match() function :
( Name='A' and Match ( 'Zone' ,'1' , '2' , 3' , '9') )
( Name='B' and Match ( 'Zone' , '2' , '24' , '37') ) ;
... and yup, you should be add same logic for your other Name values.
[Editted as I did a typo]
Still another typo: no quotes around the field name... I won't tell anyone however
Use Wildmatch(Zone, '1*') instead of Match(Zone, '1') if you want to play with wildcards in Bill's example above. See QV Desktop help for more info.