Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys!
I have the following problem,
I have two csv files, one of them have the data and the other the name of fields, when i load the information qlikview show me this
LOAD @1,
@2,
@3,
@4,
@5,
@6,
@7,
@8,
@9,
@10,
@11
and i have to change each field with other file where i have the names of that fields, who can i do this rapidly?
thanks!
an example might be helpful ...
aircode might be
Header: LOAD Header FROM Headerfile ...; // get data in structured format
Data: LOAD @1, @2 , etc FROM Datafile ...;// load the csv-table
FOR i = 0 TO NOOFROWS('Header') -1 // loop through the header-table
LET sFieldRead = '@' & i; // create a string matching with the fieldnames automatically provided in Data
LET sFieldWrite = PEEK('Header', i, 'Header'); // read the corresponding value
RENAME FIELD $(sFieldRead) TO $(sFieldWrite);
NEXT i
Peter
Hi,
you can create a mapping table from your field names and rename the fields using this mapping table:
hope this helps
regards
Marco
Marco's solution is better than mine ..