on 07-15-2015 9:13 AM
I am struggling with the XML SQL structure. I created the following structure:
<ns0:DBSTRUCTURE xmlns:ns0="urn:mynamespace">
<statement>
<dbTableName action="INSERT"/>
<table>MYTABLE</table>
<access>
<FIELD1>1</FIELD1>
<FIELD2>DossierA</FIELD2>
<FIELD3>3</FIELD3>
</access>
<access>
<FIELD1>11</FIELD1>
<FIELD2>DossierB</FIELD2>
<FIELD3>33</FIELD3>
</access>
<access>
<FIELD1>111</FIELD1>
<FIELD2>DossierC</FIELD2>
<FIELD3>333</FIELD3>
</access>
</statement>
</ns0:DBSTRUCTURE>
When I test this, I get the following information from the logging:
INSERT INTO MYTABLE () VALUES ()
Unable to execute statement for table or stored procedure. 'MYTABLE' (Structure 'statement') due to java.sql.SQLSyntaxErrorException: ORA-00928: missing SELECT keyword
Of course, the names MYTABLE and FIELD1-3 are replaced with the real names in my scenario. I can connect to the DB from PI, and search for the DB table with the external definition object.
Any ideas on how to solve this are greatly appreciated!
can you confirm the structure <access> node should be under <TableName>
can you provide the payload in the receiver channel so that i can try to help you whats went wrong also use SQL tool and connect directly to DB and use this structure to insert data into DB.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rijsdijk,
The problem is with the tag dbtablename, the structure would be:
<ns0:DBSTRUCTURE xmlns:ns0="urn:mynamespace">
<statement>
<dbTableName action="INSERT">
<table>MYTABLE</table>
<access>
<FIELD1>1</FIELD1>
<FIELD2>DossierA</FIELD2>
<FIELD3>3</FIELD3>
</access>
<access>
<FIELD1>11</FIELD1>
<FIELD2>DossierB</FIELD2>
<FIELD3>33</FIELD3>
</access>
<access>
<FIELD1>111</FIELD1>
<FIELD2>DossierC</FIELD2>
<FIELD3>333</FIELD3>
</access>
</dbTableName>
</statement>
Check also if you need to set the schema in the table tag, as MySchema.MYTABLE.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
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.