on 03-04-2014 5:34 AM
Hi Guyz,
I am having an issue while posting data in DB(DB2). I am working on PI 7.4 AEX.
If data already exist in database I want to perform update function else insert. I am using UPDATE_INSERT action in ESR. In key node I ve added all primary key fields and mapped. But I am getting error in communication channel "SqlIntegrityConstraintViolation". This error occurs when we try to duplicate values in DB. I am using UPDATE_INSERT not to try to insert duplicate values.
Please suggest
Thanks
Shivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using batch mode? Batch mode can't be used for UPADATE_INSERT or EXECUTE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shvanli,
As Mikhail said you need to try to insert a register directly in DB, Why?, because this exception indicates that an integrity constraint, foreign key, primary key or unique key, has been violated, then you need to know the exact DB table structure because you can't insert your register if you dont respect all the DB constraints implicated.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
or try to test your sql query at db side. You can use DB perspective of NWDS to connect to DB and to test sql queries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikhail,
Thanks for your response.
Can we update multiple rows at a time ... I mean some ll be just update and some ll be insert... Say 100 rows then 20 update and 80 Insert?
Second: what condition I should give in key mapping ? right now I am just doing a one to one mapping? Do I need to put some equal or AND OR condition?
Please suggest.
Thanks
Shivi
HI, header is waste node
Document Format for the Receiver JDBC Adapter - Adapter Engine (Java SE) - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.