SQL query update in jdbc reciver

521 Views Asked by At

What query need to be given in update SQL query field in JDBC sender filed insted of to stop repeating file process.i have tried executing the jdbc to file senario in sap pi it's continuously triggering the same data want to stop that and should read only till null value comes.

1

There are 1 best solutions below

0
manuel_b On

The best practice is to identify a field to mark the item you already read.

Let's say the field is STATUS for example with valid fields

  • blank -> the item has not been read before
  • 'X' -> the item has already been read and must not be processed again

Select new items in this way:

SELECT * FROM TABLE WHERE STATUS = ''

Update read items with

UPDATE TABLE SET STATUS = 'X' WHERE STATUS = ''

Note that the two statements MUST have exactly the same WHERE condition

For further reference please refer to Configuring the Sender JDBC Adapter