Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys
Sorry for posting the question on weekend
I want to store more than one Tagnames in a variable so that i can add or remove the tagnames at one place.
I mean i want to create a variable something like below
Let vTagsForEfficiency= ('MaEfficiency','CaEfficiency','daEfficiency');
Thank you
Have you tried
SET vTagsForEfficiency= ('MaEfficiency','CaEfficiency','daEfficiency');
...
select * from tablename
where TagName IN $(vTagsforEfficiency)
;
Use Concat function
Data:
LOAD * Inline [
Tag
A
B
C
D ];

=Concat(if(match(Tag,'A','B','C'),chr(39)&Tag&chr(39)),',')

Can you explain what you're trying to achieve as an end result? Why do think you need a variable with a list of values?
Hi Thank you for the response
I am using a select statement to pull the data from database as below
select * from tablename where TagName IN('MaEfficiency','caEfficiency','daEfficiency')
so, in sql statement i want to use a variable like
select * from tablename where TagName IN '$(vTagsforEfficiency)'
so that i can use change the tagnames at the variable
Pls tell me, if I am not clear in explaining you
Thank you
Have you tried
SET vTagsForEfficiency= ('MaEfficiency','CaEfficiency','daEfficiency');
...
select * from tablename
where TagName IN $(vTagsforEfficiency)
;
yes i tried..
But, I am unable to create the variable like that, with three tagnames
Thank you
I just tried and it worked for me.
Have you noticed that I used SET instead of LET statement?
Thanks bhayya super.. Really thank you for the help
Thanks for the reply bhayya.
I cant use this in my scenario
Thank you