on 05-04-2016 4:25 PM
Hi Team,
Good day!
We have this requirement to download rows from the SQL table by batch.
Sample table is:
Name Batch Sequence
A1 1
A2 1
A3 1
B1 2
B2 2
C1 3
C2 3
PI should pick all rows with batch sequence "1" first and create message in PI. (After picking mark Batch Sequence with "X")
then pick the next sequence "2" then create message in PI and so on.
Each batch sequence will have separate PI message.
Is there a way to do this or control this in the JDBC channel? If yes, what would be the select statement?
Thanks,
Carlo
Hi, Carlo!
In theory, you could try something like this:
SELECT BatchSeq, Name
FROM dbo.TestTbl
WHERE
Processed = 0 and
BatchSeq = (Select MIN(BatchSeq) from dbo.TestTbl where Processed=0)
And your update statement should use the same WHERE class condition.
It is just a kind of "proof of concept" query and you should adopt it according to your requirements.
Another way is to use scenario with JDBC adapter acting as receiver, which is more flexible, but this depends on your integration requirements and limitations.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
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.