Invalid Precision

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
nima511
Participant
Posts: 22
Joined: Thu Oct 08, 2009 8:01 am

Invalid Precision

Post by nima511 »

Hello,

I am reading a SQL Server DB Table and am loading another table on SQL Server DB.

Below is the job flow:
ODBC -> Copy -> ODBC

I have a problem wherein I get the below error for some tables and the rest of the tables seem to be loaded fine.
I have not defined any column definition explicitly and the target table is always dropped and recreated.

Error:

Code: Select all

ODBC_Enterprise_57,0: [DataDirect][ODBC SQL Server Driver]Invalid precision value

Can someone please help me figure out why I am getting this error for some of the tables.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

My guess is that you have some unbounded VarChar column definitions - that is, data type VarChar but no Length specification. DataStage can handle that, but SQL Server cannot.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nima511
Participant
Posts: 22
Joined: Thu Oct 08, 2009 8:01 am

Post by nima511 »

Ray,
Below is my input column definition for the table that is not loading:

FIELD1 DECIMAL(5,0) NOT NULL
,FIELD2 DECIMAL(10,0) NOT NULL
,FIELD3 NVARCHAR(2) NULL
,FIELD4 DATETIME NULL
,FIELD5 DECIMAL(10,0) DEFAULT 0
,FIELD6 DECIMAL(5,0) NULL
,FIELD7 DECIMAL(10,0) NULL
,FIELD8 NVARCHAR(30) NULL
,FIELD9 DECIMAL(1,0) NULL
,FIELD10 DECIMAL(5,0) NULL
,FIELD11 DATETIME NULL
,FIELD12 NVARCHAR(2000) NULL
,FIELD13 DATETIME NULL
,FIELD14 NVARCHAR(30) NULL
,FIELD15 DECIMAL(10,0) NULL
,FIELD16 DECIMAL(5,0) NULL
,FIELD17 DECIMAL(10,0) NULL
,FIELD18 DECIMAL(5,0) NULL
,FIELD19 DECIMAL(10,0) NULL
,FIELD20 DECIMAL(5,0) NULL
,FIELD21 DECIMAL(10,0) NULL
,FIELD22 DECIMAL(5,0) NULL
,FIELD23 DECIMAL(10,0) NULL
,FIELD24 DECIMAL(5,0) NULL
,FIELD25 DECIMAL(10,0) NULL
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Invalid Precision

Post by chulett »

nima511 wrote:I have not defined any column definition explicitly
What does this mean?
-craig

"You can never have too many knives" -- Logan Nine Fingers
nima511
Participant
Posts: 22
Joined: Thu Oct 08, 2009 8:01 am

Post by nima511 »

I have not defined any column definition explicitly in my job. I got this from the database to give an idea about the fields I am dealing with.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Repeating something does not an explanation make. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
nima511
Participant
Posts: 22
Joined: Thu Oct 08, 2009 8:01 am

Post by nima511 »

To isolate the field for which I was getting the error, tried dropping the field: FIELD12 NVARCHAR(2000) and I am not getting any error and the target table is getting populated.

How can I handle nvarchar(2000)?
hcsccedi
Premium Member
Premium Member
Posts: 7
Joined: Tue Nov 04, 2008 4:18 pm
Location: Richardson, TX
Contact:

Post by hcsccedi »

The job does a select * on the source table. It has no columns defined in the stage.

Basically this job selects, and copies data to a destination table. The destination table is created from the source table's metadata. Then after the table is created the data from the src table is inserted into the destination table.

It works on tables that do no have the nvarchar(2000) datatype.

So in both the source and destination stages there are no column definitions in the stage.

We are trying to figure out why using nvarchar(2000) causes the issue.
HCSC CEDI Admin
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you using Runtime Column Propagation?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nima511
Participant
Posts: 22
Joined: Thu Oct 08, 2009 8:01 am

Post by nima511 »

Yes I am using RCP.
Post Reply