Regarding pivot stage

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
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Regarding pivot stage

Post by vijaykumar »

Hi,
I created a table in oracle database using following query
create table salma(customerid number, ename varchar2(20),jansales decimal(12,2),febsales decimal(10,2))

My design is odbc---->pivot---->odbc.

Iam calling this table in my source odbc stage.

when i run the job ,iam getting peculiar error.

ob2..ODBC_0.DSLink3: DSD.BCIOpenR results of SQLColAttributes(CUSTID) gave MetaData mismatch
COLUMN.TYPE Expected = Integer Actual = Decimal.
when seeing this error.i tried to change the datatype in my created table in oracle to decimal but its not accepting.
I really feel embrassed to post this error, but please help me to analyze the error.

cheers;
vijay
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change CUST_ID to Integer in your job. Oracle uses NUMBER, which imports as Numeric, but SQLColAttributes() understands ODBC conventions rather than Oracle conventions. This can lead to minor inaccuracies when importing metadata from Oracle tables. You must make the metadata match.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Saama
Premium Member
Premium Member
Posts: 83
Joined: Wed Nov 22, 2006 6:42 pm
Location: Pune
Contact:

Post by Saama »

Hi Gurus,
Still getting the same error.
I used the following create command in SQL.
create table saama(custid number,custname varchar2(12),jansales decimal(12,2),febsales(10,2)

In the odbc properties.
i defined my column properties as
Name sql type length
custid integer 17

i checked my table using sql command desc saama
EMPNO NUMBER
CUSTNAME VARCHAR2(19)
JANSALES NUMBER(14,2)
FEBSALES NUMBER(12,2)


ob2..ODBC_2.DSLink4: DSD.BCIOpenW call to SQLColAttributes(CUSTID) failed.
SQLSTATE=24000, DBMS.CODE=0
[DataStage][SQL Client]Invalid cursor state.

gurus please help me in analyzing problem
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Your first query is completely different from second one now. As suggested by DSguru where have you made the change and how are you converting decimal field to integer?
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

IMPORT the table definition from Oracle. What comes in?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

Hi Gurus,

Thanks very much.
I have enabled create table in the target stage, there i forgot to change my datatype to decimal.

when i changed datatype for custid to decimal, its working fine.

cheers;
vijay
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

You can mark the topic as resolved. :wink:
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Post Reply