Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
In my QlikView file Edit Script, i am writting below script, but it is generating a problem.
1.) I am creating a variable i.e; If i am giving vA=Hai, then it is generating data based on "Where vA=Hai".
2.) If i am giving vA=Hai,Hello. That means it should get data only for Where A= Hai,Hello , but it is not showing any value.
(Pls Check the WHERE CONDITION in below script)
TestABC:
//LOAD * Inline
//[A,B,C
//Hai,11,xyz
//Hello,12,STU];
//STORE TestABC into TestABC.qvd;
LOAD A,
B,
C
FROM
TestABC.qvd
(qvd) Where If('$(vA)'=1,WildMatch(A,'*'), WildMatch(A,'$(vA)'));
Pls can anyone check this.
Thanks in advance.
Regards
Venkat
hei
try this code
TestABC:
LOAD * Inline
[A,B,C
Hai,11,xyz
Hello,12,STU];
Set vA="'Hai','Hello'";
Test:
LOAD A,
B,
C,
1 As Temp
resident
TestABC
Where WildMatch(A,$(vA))>0;
Drop Table TestABC
hi liron,
Thanks for your reply,
I tried what you posted script, its working .
BUT WHEN I AM TRYING like in below script, then it is not showing any Data.
Pls check this.
TestABC:
LOAD A,
B,
C
FROM
TestABC.qvd
(qvd);
//Set vA=1;
Set vA="Hai,Hello";
Test:
LOAD A,
B,
C,
1 As Temp
resident TestABC
Where If('$(vA)'=1,WildMatch(A,'*'), WildMatch(A,'$(vA)')>0);
Drop Table TestABC;
Regards
Venkat
hei
i suggest you'll use another varaible
like in the attach script
because what you have in vA is actualy an aaray of values
TestABC:
LOAD * Inline
[A,B,C
Hai,11,xyz
Hello,12,STU];
Set vA="'Hai','Hello'";
Let vB=1;
Test:
LOAD A,
B,
C,
1 As Temp
resident
TestABC
Where if ($(vB)=1,WildMatch(A,'*'), WildMatch(A,$(vA)));
Drop Table TestABC
Hi,
Try this.
let abc =1;
set data="'abc','pqr'";
Data:
LOAD * INLINE [
F1
abc
pqr
30
40
50
60
70
80
90
100
];
Data1:
Load F1 as D
Resident Data
where if($(abc) =1,WildMatch(F1,$(data)),WildMatch(F1,'*'));
Regards,
Kaushik Solanki