on 02-16-2011 1:45 PM
Hello,
I want to delete a table using a JDBC receiver interface. According to the PI documentation, the element <table> is not defined for the "DELETE" action in the receiver XML SQL structure.
Problem is that the tablename to be deleted contains non-XML-compatible characters, so I cannot define the <dbTableName> element using the table name.
Any idea how to solve this issue?
Thank you!
Can you tell us what type of characters are coming?
You can write UDF to replace the characters accordingly.
You will find many examples on SDN.
Divyesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
thank you for your answer. The name of the table contains dots ".".
How should an UDF be used to replace the name of XML tags? Still even it would be possible I assume that I would get an error in the JDBC receiver that the XML is not valid.
Maybe native SQL is an option to be considered....
You can use the below syntax and avoid calling table name...
<StatementName6>
<anyName action= u201CSQL_DMLu201D>
<access>SQL-String with optional placeholder(s)</access>
<key>
<placeholder1>value1</placeholder1>
<placeholder2>value2<placeholder2>
</key>
</anyName >
</StatementName6>
Example:
access tag query string as "Delete customer where orderid='$placheholder1$' and order_name='$placeholder2$';
This should work for sure.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.