Page 1 of 1

error

Posted: Tue Jun 20, 2006 12:26 pm
by adams06
Hi All,

i am getting this following error message

DataStage Job 542 Phantom 27961
Program "JOB.321231104.DT.1405157533.TRANS1": Line 137, Nonnumeric data when numeric required. Zero used.
DataStage Phantom Finished

can some one let me know how to resolve this.

Thanks in advance

Posted: Tue Jun 20, 2006 12:50 pm
by kcbland
You have a math expression somewhere that is not allowing for character data.

Posted: Tue Jun 20, 2006 12:51 pm
by DSguru2B
Need to know your job design. What exactly are you doing?

Posted: Tue Jun 20, 2006 12:51 pm
by kris007
The error says it all. You are trying to enter non-numeric data where it is expecting numeric data. Look into your Transformer stage and the derivations you are using in it.

error

Posted: Tue Jun 20, 2006 12:56 pm
by adams06
I have one record i.e A1 which is creating problem.

version

A1
00
01
07

how can we convert this nonnumeric data(A1) into numeric.

thanks in advance.

DSguru2B wrote:Need to know your job design. What exactly are you doing?

Posted: Tue Jun 20, 2006 12:57 pm
by DSguru2B
Dont change it. Specify that column as varchar. Or you will lose that data.

error

Posted: Tue Jun 20, 2006 1:12 pm
by adams06
The column is defined as varchar only.
DSguru2B wrote:Dont change it. Specify that column as varchar. Or you will lose that data.

Posted: Tue Jun 20, 2006 1:19 pm
by kris007
Is the datatype set to Varchar in Target? Are you sure?

Posted: Tue Jun 20, 2006 1:21 pm
by DSguru2B
Ok. This will get us no where. Did you pay attention to what Ken had asked?
Also, i am still waiting for your job design and what exactly are you doing in it.

error

Posted: Tue Jun 20, 2006 1:33 pm
by adams06
Hi DSGuru,

source-->transformer1--->sort--->transformer2-->hashfile

i am doing a sort on version.

Thanks in advance

DSguru2B wrote:Ok. This will get us no where. Did you pay attention to what Ken had asked?
Also, i am still waiting for your job design and what exactly are you doing in it.

Posted: Tue Jun 20, 2006 1:36 pm
by kcbland
The sort stage expects to do a numeric sort if a column has a data type of numeric and is one of the sort columns. Tell me, what number do you want A1 changed into?

Posted: Tue Jun 20, 2006 1:39 pm
by DSguru2B
Yes. The sort stage is expecting a numberic value and bumps on 'A1' which we both know is not numeric. Now either you need to fix your incoming data or have to go for a character sort, which might be different from what you are actually looking for , so, as Ken is asking, specify the value of A1 and handle that.

Re: error

Posted: Wed Jun 21, 2006 6:14 am
by sb_akarmarkar
[quote="adams06"]
how can we convert this nonnumeric data(A1) into numeric.
/quote]

I did not get what numeric value you want for (A1)...
But you can use NUM() to check whether come value is numeric or alphabatic
for numeric it will return 1 and for alphbatic 0..
Give the condition like if NUM(Value)=0 then @NULL else value...

Thanks,
Anupam

Re: error

Posted: Wed Jun 21, 2006 8:09 am
by kumar_s
adams06 wrote:The column is defined as varchar only.
DSguru2B wrote:Dont change it. Specify that column as varchar. Or you will lose that data.
Why is it complaining for Numeric if it is defined as Varchar?

Posted: Wed Jun 21, 2006 9:15 am
by DSguru2B
I dont think it is throughout, maybe at the source, but it has to be defined varchar at both the input and output of the sort stage.