Rows in rejection table.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Rows in rejection table.

Post by sam334 »

Need one more help.

I have four columns, Street,State,City and zipcode. Now, I have an error table where if any of the four values is NULL, it will be inserted as "error001" at the same time the same row (which is in error table) will be inserted in output table with the same error code.

Now, for reject error link, I put a constraint in transformer, (ISNULL(link1.state) or ISNUll(link1.city) or isnull(link1.street) or isnull(link1.zipcode) .... and hardcoaded the error code as "error001".. after run, all the rows with null zipcode is loaded fine in error table.
But, as I want to load the same rows in output table with errorcode001, those rows are still loading as Null.

I used IF condition in errorcode column in transformer as IF State = @Null or city = @Null or state = @null or zipcode = @null then "errorcode007" else errorcode...

Its still loading the null errorcode in output table, not taking the errorcode "error001"

Sorry for lengthy explanation. Any thoughts
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Nothing ever equals NULL, you need to stick with the same IsNull() function you used in the constraint.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Thanks Craig. It worked now.
Post Reply