How to convert XMLTYPE in VARCHAR in ORACLE? -


i have 2 columns in table(transaction) in oracle xmltype(xml_in , xml_out). procedure not working because don't know how convert them varchar or something(i think error). procedure is:

procedure search_xml (     p_id_transaction in transaction.id_transaction%type,      p_cursor out t_cursor ) begin      open p_cursor      select t.xml_in, t.xml_out     transaction t     t.id_transaction = p_id_transaction;  end search_xml; 

when call procedure error message in visualstudio2008 is: "unsupported oracle data type userdefined encountered." idea how working?

xmltype has 2 methods: getstringval() , getclobval() convert xml structure string representations (as varchar2 , clob respectively). unless know xml output going less 4000 characters (bytes) want use getclobval() this:

procedure search_xml (     p_id_transaction in transaction.id_transaction%type,      p_cursor out t_cursor ) begin   open p_cursor     select t.xml_in.getclobval() xml_in,            t.xml_out.getclobval() xml_out     transaction t     t.id_transaction = p_id_transaction; end search_xml; 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -