cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to slect single rows using JDBC sender adapter?

Former Member
0 Kudos

Hello!

We have a fully working scenario using the JDBC sender adapter to poll an AS400/DB2 table for data, pass data to XI, map, post to SRM.

Now we are in QA and have run into a little problem.... When we poll the DB2 table we use a "SELECT * FROM tablea WHERE processed = ''"statement, and then we use an "UPDATE tablea SET....." as the UPDATE statement. It is working fine, but now we have a new requirement that we are only to read ONE row in the table (and update the process flag back) at a time. This is not possible using SELECT WHERE because we really dont know what will be in the table. So what we really need is a SELECT SINGLE or something like that.

Not beeing an expert at all I wanted to check with you guys if you know if this is doable without having to rewrite all our programs etc?

Thankyou!!

Nam

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

if you want Sender JDBC adapter to select only one row aat a time this is not possible.

Even if it selects multiople row, you can create <ROW> in your Datatype as 0 to unbounded and use your maping to do the needed setting ( use a Multi Maping if needed ).

Can you give us the entire scenario and why you want to select only one row at a time so maybe other soultions can be looked at.

Regards,

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

test this instruction too:

select * from table a

where rrn(a) = (select min(rrn(b)) from table b)

Former Member
0 Kudos

test this instruction: Sorry i don´t speek english.

with t00 as

( select min(rrn(tablea)) minrecord

from tablea )

select b.*

from t00 a,

tablea b

where rrn(b) = a.minrecord

udo_martens
Active Contributor
0 Kudos

Hi Nam,

you can put any SQL statement what is supported by the driver. Check at your database for example

up to 1 rows (may be only in ABAP)

select .. where field = (select max(field)..)

You dont need to rewrite XI parts, just put the right SQL statement into the sender adapter.

Regards,

Udo