Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adurgani
Contributor III
Contributor III

Create a calculated field in a table from other fields

LOAD

     [Cost Center],

     if([Cost Center]='0506','IT Planning and Compliance',[Cost Center Description]) as CCDESC,

     [Cost Center] &'-'& CCDESC as Group

.....

The error I get is

"Field not found - <CCDESC>"

2 Replies
boorgura
Specialist
Specialist

You cannot use CCDESC in the same load.

Either you will have to do a preload.

OR use this:

if([Cost Center]='0506','IT Planning and Compliance',[Cost Center Description]) as CCDESC,

     [Cost Center] &'-'& [Cost Center]='0506','IT Planning and Compliance',[Cost Center Description]) as Group

vishsaggi
Champion III
Champion III

Or use a preceding load like

TableName:

LOAD *,

          [Cost Center] &'-'& CCDESC as Group;

LOAD

     [Cost Center],

     if([Cost Center]='0506','IT Planning and Compliance',[Cost Center Description]) as CCDESC

     ......;