Sreeram
Sreeram

Reputation: 11

How to check the field value value is blank and make it to 0 in informatica powercenter?

I am currently working on a project where there is a scenario in which I have to check the field value(in decimal data type) is blank or not, if it is blank I have to make that particular blank value into 0. How to bring out this logic using expression transformation in informatica powercenter 9.6.1?

Upvotes: 1

Views: 12899

Answers (3)

Sheet Pangasa
Sheet Pangasa

Reputation: 11

Since the question speaks about blank values as well, you might want to check for '' apart from nulls as mentioned in other answers:

IIF(ISNULL(FIELD) OR LTRIM(RTRIM(FIELD))='',0,FIELD)

Upvotes: 1

Ajay
Ajay

Reputation: 1

Create a new output port in the Expression transformation and use either of the two expressions.

Expression 1:

Decode(Field,NULL,0,Field)

Expression 2:

IIF(ISNULL(Field),0,Field)

Upvotes: 0

Samik
Samik

Reputation: 3455

Create an output port with the expression:

IIF(ISNULL(field),0,field)

Upvotes: 1

Related Questions