cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter Doubt

Former Member
0 Kudos

Hi Guys,

If multiple records are in a table and I need to fetch records one at a time in a predefined order. How can i do this in XI ?

Regards,

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Varun ,

Can you share the syntax with me of select top 1 .

Regards,

Former Member
0 Kudos

Varun,

Handling the records is different thing , i want to select the data one by one...from XI like we use order by clause in RDBMS..

Regards,

former_member192892
Active Contributor
0 Kudos

Santhosh,

In that case modify your Select statement as Select top 1

Former Member
0 Kudos

Hi Guys,

Regarding select query at sender JDBC Adapter :

I have two doubts :

1. Definitely we use primary key with where clause in JDBC Sender Adapter for pulling the data , but in the real time the table is being populated with new values , so we can't use the fixed values along with a hard coded primary key in Sender Adapter level .. so how to tackle this scene. ?

2. How to tackle the scenario if table is with composite key,..on running the query with a primary key we will get certain set of records ...then how can we send the records one by one in a particular fashion to other side...?

I hope i have made my doubts clear to all..Kindly come up with suggestions and views..

Regards,

former_member192892
Active Contributor
0 Kudos

Santhosh,

Even if you are getting multiple rows from your select query, you can handle the records in your mapping right? You can do 1:n mapping also..

Do you have any specific business requirement??

Former Member
0 Kudos

Hi Santosh,

If you are not able to handle this situation thru SQL Statement query then write a stored procedure with all the logic required to handle another table inside the main table. When the stored procedure will run you will get structured data as per your requirement according to the logic written there.

Regards,

Subhasha

Former Member
0 Kudos

Hi

The predefined order should be provided in the where clause of the SELECT Query.Explain the scenario so that we can help.

Thanks

former_member189387
Active Contributor
0 Kudos

Hi ,

<b><i> If multiple records are in a table and I need to fetch records one at a time in a predefined order. How can i do this in XI ?</i></b>

If ur table contains any primary key number Column like serial number . <b>select * from where primefield=( select max(primaynum)</b> from tabel ) . This will return one row . Then use some marker column in that table , use flag to determine read row .

Hope it will help you

Regards.,

V.Rangarajan