Page 1 of 1

using odbc stage to input date data into sqlserver

Posted: Wed Jun 17, 2020 12:21 pm
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 ?

Posted: Sat Jun 27, 2020 8:25 pm
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.