Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
LauraMorris
Contributor III
Contributor III

Use string stored in variable for wildmatch

Hi

I have a wildmatch funtion which is used in multiple places within my loadscript. There are a lot of ID's being matched against so I want to store them in a variable and call them into each wildmatch so that they can all be updated easily.

So far I have:

Let $vClient='180,191,213,219,228,255,320,322';

[client]:
LOAD
clientid,
clientname
FROM [lib://qvds/client.qvd](qvd)

WHERE match(clientid,'$(vClient)');

 

This is returning me 0 rows whilst if I put the contents of the string into the match I get 16 rows.

I have tried using " instead of ' in all combinations in the variable and in the match.

1 Reply
danilostochi
Creator II
Creator II

Hi,

try it.

 

 

SET vClient = 180, 191, 213, 219, 228, 255, 320, 322;

[client]:
LOAD
clientid,
clientname
FROM [lib://qvds/client.qvd](qvd)

WHERE match(clientid, $(vClient));

+55(44) 9 9993-3605, WhatsApp
E-Mail or Skype - danilo16stochi@hotmail.com