cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.0 - jdbc receiver issue with MS SQL Server

0 Kudos

Hello Experts,

I have a jdbc receiver scenario on PI 7.0 for just one table on MS SQL Server and I'm using the update_insert action.

When the entry does not exist it is created normally and returns insert_count=1 and update_count=0.

When the entry already exists, it's generated the statements for insert and for update (the 2 statements are visible on RWB) and returns insert_count=0 and update_count=0.

Any error occurs and in the RWB the log shows the request was processed with success.

I've already enabled the log for sql statements on the channel, but the statements are correct.

I've reviewed also the <key> tag on the mapping and it's ok.

Any suggestion to try fix this issue?

Thank you very much.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It seems to be an issue with the update statement not working according to your requirement. What is the data type of the key value for which the query is being executed.

Regards,

Indranil

0 Kudos

Indranil,

The key has 2 fields, one is CHAR(10) and the other is CHAR(4), both is NOT NULL.

Thank you.

Former Member
0 Kudos

Can you please check in the database the format of the specified fields in the update statement. Sometime we can have situations that the insert works but the subsequent update fails. An example:

Suppose key field1 value being passed from XI is '1234' in characters but in db it is stored as '00001234'.

Regards,

Indranil

0 Kudos

I fixed my mapping and worked.

Thank you.

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Just Few cents...

Since we see issues only during update statement...

Use the same update statement and check it using toad or some database tool ? Just to make sure the query or data that is being used by statement is not causing. otherwise you might need to see SAP Notes regarding update statement if any.