on 03-15-2007 7:10 PM
Hi,
I want to make an Insert statement to a DB2 Database, and one of the fields has a "$" Character, so I can not make an XML Document Format for the Mode XMB2DB_XML.
Using that Mode, what can I do?
Regards,
Luis Diego
Hi Luis
You can create a stored procedure in your DB2 backend and create an XML document format to execute the SP.
This is more performance efficient than using a dynamic SQL statement
Thanks
Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use special character to handle escape characters
See the below link
http://help.sap.com/saphelp_erp2005vp/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
Also see the below Q SAP Note 831162
Q: I am sending a SQL_QUERY or SQL_DML statement that makes use of placeholders to a JDBC Receiver, which looks as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<stmt>
<Update action="SQL_DML">
<access>
UPDATE TABLE SET Name='$NAME$' WHERE ID='$ID$'
< /access>
<key>
<NAME>Joe's Name</NAME>
<ID>42< /ID>
</key>
</Update>
</stmt>
</root>
When executing the resulting query, my DBMS reports an error similar tothe following one:
"SQL command not properly ended"
Why doesn't the JDBC receiver escape the apostrophe I use within my placeholder's data?
Regards
Chilla
<i>reward points if it is helpful..</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandra,
Thanks for your reply. What I mean is, I have a "Database field" with a $ Character.
Like this:
[code]
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<stmt>
<Update action="SQL_DML">
<access>
UPDATE TABLE SET CU$FNLK='$NAME$' WHERE ID='$ID$'
< /access>
<key>
<NAME>Joe's Name</NAME>
<ID>42< /ID>
</key>
</Update>
</stmt>
</root>
[/code]
What can I do?
Regards,
Luis Diego
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.