[odbc sql server driver] Invalid descriptor index

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
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

[odbc sql server driver] Invalid descriptor index

Post by srini.dw »

Hi Guys,

Please need your help to resolve this issue.

Job design
ODBC Connector -> Copy -> DataSet.

When I give the below SQL query in ODBC Connector, Iam able to view data.
select ID, Date, status, Description from Headcount

But when I give below SQL query, its having issue.
select ID, Date, status, Description, Created from Headcount

Its giving me the below error.
An exception occured while trying to receive the response from the handler: An exception was received from the handler; ODBC function
"SQLGetData" reported: SQLSTATE = 07009:Native Error Code = 0: Msg = [IBM(DataDirect OEM)[ODBC SQL Server Driver][ SQL server Driver]
Invalid Descriptor Index

The above SQL works fine in SQL server.
The column Created is datetime in Source and having the below values.
2013-04-18 04:11:03.020
2013-04-18 04:11:42.177

Any thoughts on this.

Thanks,
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Does this apply?

viewtopic.php?t=145508
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Post by srini.dw »

Thank you for the reply.
The issue was resolved with the cast function as below, seems to be data issue.

select ID, Date, status, CAST(Description as varchar(250) ) as Description, Created from Headcount

Thanks,
Post Reply