Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I have column values in one variable like ,
variable name : vField
'A','B','C'
i want to load like
Load $(vField) from XYZ.qvd (qvd);
but it is not loading , can you guys help
also tried like
"A","B","C"
but not
Hi,
Please find the attached sample.
DimensionMax:
Load count(Header) AS Count ,
Header AS Field
// Concat(Chr(91) & Header & Chr(93), ',',Load_Order) AS Fields
Resident Column_Header_temp
Group by Header
order by Load_Order;
Drop Table Column_Header_temp;
Let vNoofField= NoOfRows('DimensionMax');
Let vFields2=Peek('Field',0,'DimensionMax');
For i=0 to NoOfRows('DimensionMax')-1
Let vFields1 = Peek('Field',0,'DimensionMax');
Let vFields = Concat(Chr(91) & Peek('Field',$(i),'DimensionMax')& Chr(93), ',');
Next
bold line is not working for me can you please tell what wrong i am doing ?
I think this will be useful for you: Re: Interesting challenge: How to create a real table from a list of field names?
- Marcus
Hi Agnivesh,
Try this,
DimensionMax:
Load count(Header) AS Count ,
Header AS Field
Resident Column_Header_temp
Group by Header
order by Load_Order;
Drop Table Column_Header_temp;
Temptable:
Load Concat(Chr(39) & Field & Chr(39),', ') as Field_Names
Resident DimensionMax;
Let vFields = Peek('Field_Names',0,'Temptable');
DROP Table Temptable;
You should use SET instead of LET.
Set vFields = Concat(Chr(91) & Peek('Field',$(i),'DimensionMax')& Chr(93), ',');