Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Generic load works perfect when we have few values in rows that need to be converted into columns.
But I have column which has thousands of rows that need to be converted to columns.
Any suggestion or work around???
Currently I am using below code, but it is taking hours to complete.
Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='GenericLabel' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo
CombinedGenericTable:
Load distinct Key From GenericDB;
For each vTableName in $(vListOfTables)
Left Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table [$(vTableName)];
Next vTableName