using odbc stage to input date data into sqlserver

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
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

using odbc stage to input date data into sqlserver

Post by jsgoncalves »

Hello everybody

I have one sqlserver table with an attribute type date
i'm using a odbc stage to "insert rows without clearing"
i'm suging a odbc stage to select a row
i'm using a transformer just to match directly

i'm getting errors:
(1)
[...]: DSD.BCIOpenW results of function SQLColAttributes(data) gave MetaData mismatch
COLUMN.TYPE Expected = Date Actual =
and i have to define attribute data as varchar(10) so i don't get this error
(2)
[...]: ..load.load_gg_dados_comboio_dia: DSD.BCIPut call to function SQLExecute failed.
SQL statement:INSERT INTO gg_dados_comboio_dia(data) VALUES (?)
SQLSTATE=22008, DBMS.CODE=241
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]filed to convert data and/or hour [...]

data = 2020-01-01

Can someone help me, please ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, VarChar(10) or Char(10). Set the Data Element value to Date to specify to the ODBC driver that it's a date.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply