Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
i try to rename a field name now is Date_Inquiry on load script , i want to rename to Date
I try below it does not work :-
RENAME Field Date_Inquiry to vFieldNew;
Paul
Hi,
then use this
QUALIFY *;
UNQUALIFY [Ref. No];
UNQUALIFY Date;
For i = 0 to NoOfRows('Inquiry') - 1
LET vSheet = peek('SheetName', $(i), 'Inquiry');
Inq:
concatenate
LOAD ////dont use * here list all field instead
sample_field1,
sample_field2,
[Date_Inquiry] as Date
FROM $(vRAWPath1)Marketing Inquiry.xlsx
(ooxml, embedded labels, table is $(vSheet));
next i
UNQUALIFY *;
drop field SheetNo;
drop field SheetName;
Hi
here's the script,
SAMPLE_TABLE:
LOAD
Date_Inquiry as Date, ////or whatever name you want, just replace Date
sample_field1,
sample_field2,
sample_field3
FROM
YOUR SOURCE;
Regards,
Alex
Hi Alex ,
mine script is like below , i read all the field into qv table , and at the end i need to change the field name. any alternative , or i must field name one by one ?
QUALIFY *;
UNQUALIFY [Ref. No];
UNQUALIFY [Date_Inquiry];
For i = 0 to NoOfRows('Inquiry') - 1
LET vSheet = peek('SheetName', $(i), 'Inquiry');
Inq:
concatenate
LOAD
*
FROM $(vRAWPath1)Marketing Inquiry.xlsx
(ooxml, embedded labels, table is $(vSheet));
next i
UNQUALIFY *;
drop field SheetNo;
drop field SheetName;
//RENAME Field Date_Inquiry to vFieldNew;
Hi,
then use this
QUALIFY *;
UNQUALIFY [Ref. No];
UNQUALIFY Date;
For i = 0 to NoOfRows('Inquiry') - 1
LET vSheet = peek('SheetName', $(i), 'Inquiry');
Inq:
concatenate
LOAD ////dont use * here list all field instead
sample_field1,
sample_field2,
[Date_Inquiry] as Date
FROM $(vRAWPath1)Marketing Inquiry.xlsx
(ooxml, embedded labels, table is $(vSheet));
next i
UNQUALIFY *;
drop field SheetNo;
drop field SheetName;
Hi,
Try like this
FieldMap:
MAPPING LOAD * INLINE [
OldName, NewName
Test, Data
Test1, Data1
];
Test:
LOAD * INLINE [
Test, Test1
1, 100
2, 200
3, 300
4, 400];
Rename fields using FieldMap;
Regards,
Jagan.
Hi All
I thou QV have rename commend can rename field after table is generated. so look like i need to follow alex and jagan advise. Thank you very much.