Hi,
Im trying to read XML data from Oracle XMLType column and insert into another Oracle table column of XMLType using ODBC Connector stage in datastage 8.1.
During insert the below error is thrown:-
ODBC_Connector: ODBC function "SQLFetch" reported: SQLSTATE = HYC00: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle driver]Driver does not support selecting a column of type XMLType. You must cast columns of type XMLType to a CLOB by using the cast function.
How to overcome this error?
Query used to read data :-
select x.REPORT_XML.getclobval() as REPORT_XML,CR_RPT_NUM ,PAGE_IND from temp x;
Insert Statement in ODBC Connector:-
INSERT INTO temp1(REPORT_XML,CR_RPT_NUM,PAGE_IND) VALUES(sys.xmltype.createxml(ORCHESTRATE.REPORT_XML),ORCHESTRATE.CR_RPT_NUM,ORCHESTRATE.PAGE_IND)
Inserting or Updating Xml data into Oracle table
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 2
- Joined: Tue Mar 17, 2015 9:54 pm
I thought the Connectors were updated to handle the XML Type, but you are on 8.1, which is really old.
Anyone else tried it in a newer release?
Ernie
Anyone else tried it in a newer release?
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Just an idea, since you're on a very old version: can you handle the XML as a VarChar (or Long VarChar) data type within your job design? Ignore (or demote) any metadata mismatch alerts.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 2
- Joined: Tue Mar 17, 2015 9:54 pm
Thanks for the responses.
When I tried to insert as CLOB the below error is given
ODBC_Connector_15,2: ODBC function "SQLFetch" reported: SQLSTATE = HYC00: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle driver]Driver does not support selecting a column of type XMLType. You must cast columns of type XMLType to a CLOB by using the cast function. (CC_OdbcInputStream::open, file CC_OdbcInputStream.cpp, line 173)
Below is the insert statement and REPORT_XML is a CLOB in target table
Insert into temp2(CR_RPT_NUM,PAGE_IND,REPORT_XML) values (orchestrate.CRNUM,orchestrate.PAGE_IND,orchestrate.REPORT_XML);
When I tried to insert as CLOB the below error is given
ODBC_Connector_15,2: ODBC function "SQLFetch" reported: SQLSTATE = HYC00: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle driver]Driver does not support selecting a column of type XMLType. You must cast columns of type XMLType to a CLOB by using the cast function. (CC_OdbcInputStream::open, file CC_OdbcInputStream.cpp, line 173)
Below is the insert statement and REPORT_XML is a CLOB in target table
Insert into temp2(CR_RPT_NUM,PAGE_IND,REPORT_XML) values (orchestrate.CRNUM,orchestrate.PAGE_IND,orchestrate.REPORT_XML);
-
- Premium Member
- Posts: 28
- Joined: Thu Oct 23, 2014 1:49 pm