on 09-27-2005 6:37 AM
I have XML
<persons>
<person>
</person>
....
</persons>
I need to perform UPDATE or INSERT for each <person> in one transacion.
Will this SQL XML work?
<STATEMENT>
<TABLE_NAME action="UPDATE_INSERT">
<table>realDbTableName</table>
...
</TABLE_NAME>
<TABLE_NAME action="UPDATE_INSERT">
<table>realDbTableName</table>
...
</TABLE_NAME>
...
</STATEMENT>
Is it posible to prevent UPDATE if the data in <parson> are the same like in DB TABLE?
Hi,
use insert if you don't want to update in case the record already exists in the db table
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergey,
No it won't. You do not need to specify the table name on each and every lineitem. You just need to specify on the first entry then it will populate the columns accordingly.
If the data is same then the JDBC adapter will not update the table column thus no Insert task will be performed. Thats the benefit of using the UPDATE_INSERT action instead of just the Insert.
Cheers,
Ranjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I meant use UPDATE only and not UPDATE_INSERT. I think how the adapter works is that when you use UPDATE_INSERT, only one of the action will be executed either UPDATE OR INSERT. In the same of the same data if you use the UDATE_INSERT, even if its not going to update the data, it will still insert the same value. So, I think you will need to use only UPDATE so that ONLY the changed data will be populated into the table.
This link will be helpful for you.
http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
Cheers,
Ranjan
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.