Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have one field which contains 100 unique value. I want to list down all fields value under one variable at script level. Below is the example;
Category
A,
B,
C,
D,
E,
F
Post achieving this, i will be using this variable in wildmatch or substringcount function at script level.
Could you please help me to achieve this?
Regards,
Imran K
Maybe like
TMP:
LOAD CONCAT(DISTINCT Category, ', ') as Tmp
RESIDENT YourTableWithCategory;
LET vCat = Peek('Tmp',0,'TMP');
or
TMP:
LOAD CHR(39) & CONCAT(DISTINCT Category, CHR(39)& ', ' & CHR(39) ) & CHR(39) as Tmp
RESIDENT YourTableWithCategory;
LET vCat = Peek('Tmp',0,'TMP');
then
DROP TABLE TMP;
You could use concat for this:
concat:
load concat(distinct Category, chr(39) & ',' & chr(39)) as CategoryList From xyz;
let vCategoyList = peek('CategoryList', 0, 'concat');
and then you could use '$(vCategoryList)' within your functions.
- Marcus