简体   繁体   中英

SQL query update in jdbc reciver

需要在 JDBC 发件人字段中的更新 SQL 查询字段中给出什么查询以停止重复文件进程。我已尝试执行 jdbc 以在 sap pi 中归档 senario 它不断触发相同的数据想要停止它并且应该只读到空值来了。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM