Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Does somebody know, how to build column in a table from variables
i have $(var1), $(var2), $(var3)
My desired output should be table with column like:
Col1:
var1,
var2
var3
Thanks
OK, thank you all but i found it at first i generate dummy table with auto generate based on count how many non empty variables , then i used CROSSTABLE to get the result and just uncut the unneeded fileds, quite a funny solution but it works, i will post later code
Does these variables have multiple values or just single value? If they have multiple values, how are you creating these variables in the first place?
can you explain little bit more??
Hi, only single value ( like some names of operations 'Service', 'Main', etc.)
Just do this
Col1:
LOAD '$(var1)' as var1,
'$(var2)' as var2,
'$(var3)' as var3
AutoGenerate 1;
actually it's generate not a column but one row
var1 | var2 | var3 |
, but i need it as a column in one table
Col1 |
var1 |
var2 |
var3 |
OK, thank you all but i found it at first i generate dummy table with auto generate based on count how many non empty variables , then i used CROSSTABLE to get the result and just uncut the unneeded fileds, quite a funny solution but it works, i will post later code