Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I've been working on this for over the last two days and I got so many help but I am still not able to complete it.
I have a table that shows data as attached sample.
Is there anyway i can do a Generic load to load data correctly
The unique Key should be raw ID
Raw Id record ID (Values of Custom Field Label) (Values of Custom Field Value)
20932 48421 CV1 CV2 CV3 CV4........ V1..V2..V3..V4.....
26746 48048 CV1 CV2 CV3 CV4.... V1..V2..V3..V4...
26747 48048 CV1 CV2 CV3 CV4.... V1..V2..V3..V4...
And so on.
What is exactly your problem ?
The possible solution has been posted.
Another thing to try is not to drop tables in the same loop with joins.
Drop It later in a second loop.
Found it. Your problem as I said was spaces.
Your previous code works perfect, you should just use [] with table name.
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
LEFT JOIN (result) LOAD * RESIDENT [$(vTable)];
DROP TABLE [$(vTable)];
NEXT i
What is exactly your problem ?
The possible solution has been posted.
Another thing to try is not to drop tables in the same loop with joins.
Drop It later in a second loop.
Found it. Your problem as I said was spaces.
Your previous code works perfect, you should just use [] with table name.
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
LEFT JOIN (result) LOAD * RESIDENT [$(vTable)];
DROP TABLE [$(vTable)];
NEXT i
hi,
thanks for your help.
I don't think the spaces are causing the issue.
Simply this code got me what i need:
original:
LOAD RecordId,
CustomFieldSection,
RowId,
CustomFieldLabel,
CustomFieldValue
FROM [..\data\harborflex\hbdata.xml] (XmlSimple, Table is [PortfolioExportData/tblCustomFieldValue])
Where CustomFieldSection='Office Composition';
temp1:
generic load * resident original;
drop table original;
Thanks,