Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I add 2 fields in the script and create a new field with the sum?

I have two fields:

'Salary' 'Bonus'

I'd like to create a third field in the script with the sum of the 2. Is that posssible?

Thanks in advance!

1 Solution

Accepted Solutions
hector
Specialist
Specialist

It's possible if you sum the 2 fields like the previous post said, but just to be sure that there are not NULL values, maybe you can use


rangesum(Salary,Bonus) as Salary_plus_Bonus


rgds

View solution in original post

3 Replies
Not applicable
Author

Totally possible. Simply add the expression within your load script, e.g. 'Salary' + 'Bonus' AS 'Salary_Inc_Bonus' (or however you wish to name your new field).

hector
Specialist
Specialist

It's possible if you sum the 2 fields like the previous post said, but just to be sure that there are not NULL values, maybe you can use


rangesum(Salary,Bonus) as Salary_plus_Bonus


rgds

Not applicable
Author

Both worked and the rangesum took care of non-# entries. Thanks!