SQL Server SMALLDATETIME data type error

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
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

SQL Server SMALLDATETIME data type error

Post by neena »

Hi,

One of the column data type is defined as SMALLDATETIME in SQL Server when I imported it into the Datastage it changed to CHAR(16).
When I am trying to view data through DRS Stage, it's throwing an error saying "metadata mismatch, Datastage datatype and database datatype differ".
I tried writing a userdefined SQL in the stage and used all the functions like (Convert, cast, substring) but it's still throwing a warning.
I even used the ODBC stage but didn't helped.
Could any one please let me know what might causing the issue.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There are 22 other posts on issus with SMALLDATETIME, did none of them help?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

In the input change manually to the type 'sql.smalldatetime' .

Regards
Sreeni
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Post by neena »

I missed the server forum. But after the search I came to know that in server if we change the datatype to Timestamp it work's fine, but it didn't worked for me in Parallel. I don't know if that makes any difference but just mentioning it.
In another post it was mentioned, ODBC cannot recognize SMALLDATETIME. I think this might be the issue.
but my question would be why is that while importing the matadata through ODBC it didn't throw a warning?
I tried importing it from orchdbutil but I guess we are not set up for that.
The work around we did was to change the datatype from SMALLDATETIME to DATETIME in the SQL Server table.

I am just curious to know if anyone was able to read the data in parallel when the Data type was mentioned as SMALLDATETIME in SQL server and how you did it.

Sreeni, when I imported the metadata it is already defined as 'sql.smalldatetime'
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

What is the error message ?
Write about the error you are getting .

Regards
Sreeni
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Post by neena »

When I am trying to view data through DRS Stage, it's throwing an error "Metadata mismatch for column X, Datastage column type and database column type differ".
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Does this only occur in the Viewer? Meaning, does the job run to completion without error or does it log the same message?
-craig

"You can never have too many knives" -- Logan Nine Fingers
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Post by neena »

It logs the same message as warnings when I run the job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, just wanted to double-check as sometimes an error can be a 'view data only' error.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply