on 06-27-2007 9:39 AM
Hi all,
I am using receiver jdbc adapter to insert data into oracle database, but I need to use single quote to make value as string, for example:
insert into ztable (id , name, description) values( 1, 'Jonathan', 'this is description(simple)' );
if I don't use QUOTE here, I will get error because there are "(" ")" in the DESCRIPTION value.
I see some threads mentioned to add attribute hasQuot= YES to realize this function, but I have tried, nothing happened, is there any tricks to make this happen?
Can you provide us with the target XML that is casuing this issue,.
normally, hasQuot = 'YES' does the trick. Maybe there is someother issue.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please see the following XML, I both used YES and Yes, but both not work
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_HPQA xmlns:ns1="http://mes/so_download">
<insert1>
<R_ERP_SO_HEADER action="INSERT">
<table>R_ERP_SO_HEADER</table>
<access>
<MESSAGE_NO/>
<DATI_MESSAGE>20070627143132</DATI_MESSAGE>
<MESSAGE_CODE>2030</MESSAGE_CODE>
<SENDER/>
<RECEIVER/>
<MD_SEQ_NO hasQuot="Yes">0000121051#</MD_SEQ_NO>
<SONO>0000121051</SONO>
<USERID>CAOBO</USERID>
<SOSAPTYPE>1</SOSAPTYPE>
<PONO>123</PONO>
<PODATE>00000000</PODATE>
<SALESORG>5000</SALESORG>
<SALESORGDESC hasQuot="YES">迁钢钢铁产品销售</SALESORGDESC>
<DISTCHAN>20</DISTCHAN>
<DISTCHANDESC>经销商</DISTCHANDESC>
<DIVISION>16</DIVISION>
<DIVISIONDESC>钢材 --- 热轧</DIVISIONDESC>
<SALESGRP>042</SALESGRP>
<SALESGRPDESC>销售公司:分销科(热轧</SALESGRPDESC>
<SALESOFFICE>0015</SALESOFFICE>
<SALESOFFICEDESC>销售公司:热轧销售处</SALESOFFICEDESC>
<TRANSPORTCONDITIONCODE>01</TRANSPORTCONDITIONCODE>
<TRANSPORTCONDITION/>
<SOLDTO/>
<SHIPTO/>
<INVTO/>
<DATEMOD>00000000</DATEMOD>
<DATEENT>20070524</DATEENT>
<TIMESTAMP>20070627143132</TIMESTAMP>
<CUSTCERTFICATEID/>
<CUSTPAYERID/>
</access>
<key>
<SONO>0000121051</SONO>
</key>
</R_ERP_SO_HEADER>
</insert1>
<insert2>
<R_ERP_SO_ITEM action="UPDATE_INSERT">
<table>R_ERP_SO_ITEM</table>
<access>
<MESSAGE_NO/>
<DATI_MESSAGE>20070627143132</DATI_MESSAGE>
<MESSAGE_CODE>2030</MESSAGE_CODE>
<SENDER/>
<RECEIVER/>
<MD_SEQ_NO>0000121051#</MD_SEQ_NO>
<DETAIL_POS>000010</DETAIL_POS>
<SONO>0000121051</SONO>
<SOITEM>0010</SOITEM>
<MATNO>38000001</MATNO>
<RAILWAY/>
<UNLOADPOINT/>
<DKUNNR1/>
<SOQUAN>0</SOQUAN>
<UNIT>KG</UNIT>
<DISPDATE>0000-00-00</DISPDATE>
<DISPATCHREADYMAX>0000-00-00</DISPATCHREADYMAX>
<DISPATCHREADYMIN>0000-00-00</DISPATCHREADYMIN>
<CANCELTYPE/>
</access>
<key>
<SONo>0000121051</SONo>
<SOITEM>000010</SOITEM>
</key>
</R_ERP_SO_ITEM>
</insert2>
</ns1:MT_HPQA>
the output sql as following:
INSERT INTO R_ERP_SO_HEADER (MESSAGE_NO, DATI_MESSAGE, MESSAGE_CODE, SENDER, RECEIVER, MD_SEQ_NO, SONO, USERID, SOSAPTYPE, PONO, PODATE, SALESORG, SALESORGDESC, DISTCHAN, DISTCHANDESC, DIVISION, DIVISIONDESC, SALESGRP, SALESGRPDESC, SALESOFFICE, SALESOFFICEDESC, TRANSPORTCONDITIONCODE, TRANSPORTCONDITION, SOLDTO, SHIPTO, INVTO, DATEMOD, DATEENT, TIMESTAMP, CUSTCERTFICATEID, CUSTPAYERID) VALUES (NULL, 20070627143132, 2030, NULL, NULL, 0000121057#56DC81468CD2A4D4E10000000A01FA32, 0000121057, CAOBO, 1, 111111, 00000000, 5000, 迁钢钢铁产品销售, 20, 经销商, 16, 钢材 --- 热轧, 042, 销售公司:分销科(热轧, 0015, 销售公司:热轧销售处, 01, NULL, NULL, NULL, NULL, 00000000, 20070524, 20070627143132, NULL, NULL)
another question is ,I don't know how to insert date data into oracle, do I need to do some conversion, if I get 2007-06-27 from SAP, what I need to do to convert this date to Oracle date type, then insert it into oracle DB?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.