Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the extract file then a transform file
I need to
in the transform file capitalize a field during load
The field already exists in the loaded extract file
I then need to
capitalize([Test Field]) as Test Field
I need the field name to stay the same
so basically I am updating the field during the transform
It wont let me use the same name
This is my transform script
MainData:
Load*
FROM
$(vPathQVDExtract)000_File_Extract.qvd
(QVD);
Calcs:
Load *,
MonthName([Date of Entry]) as Month,
YearName([Date of Entry]) as Year,
If([Target Completion date]='TBD' or [Target Completion date]='TBC' or IsNull([Target Completion date]),1,0) as TargetCompletionDate,
Capitalize([Action Status]) as [Action Status]
Resident MainData;
hi,
Yes the error has it's right because you are loading the same field with the same name twice.
You can write it like this
Calcs:
Load *,
MonthName([Date of Entry]) as Month,
YearName([Date of Entry]) as Year,
If([Target Completion date]='TBD' or [Target Completion date]='TBC' or IsNull([Target Completion date]),1,0) as TargetCompletionDate,
Capitalize([Action Status]) as [Action Status2]
Resident MainData;
drop field [Action Status];
rename field [Action Status2] to [Action Status];
hope it helps,
Andrei
You want from the field All Strings into UPPER? Then use UPPER() else If you want to get All first character from The Field value of different Words use CAPITALIZE()