Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
spikenaylor1
Creator
Creator

Captilize

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;

2 Replies
andrei_delta
Partner - Creator III
Partner - Creator III

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

Anil_Babu_Samineni

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()

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful