cancel
Showing results for 
Search instead for 
Did you mean: 

Retrive data from two diffirent tables

Former Member
0 Kudos

Hello all,

In my interface source side using JDBC adapter. I need to retrieve data from two different tables. Can anyone suggest me how can i retrieve data from two different tables.

Thanks & Regards,

Venkatk

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks everybody for your response!!

Former Member
0 Kudos

Hi Venkat,

Hope this too helps:

Cheers,

Manjusha.

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Sender Data Type Structue would be same format as for single table, Only change in SQL query.

Your Sender structure would be, in your sender data type create required element from table1, table2 and write SQL query in Sender Communication channel.

<resultset>

<row>

<column-name1>value</ column-name1>

<column-name2>Value</column-name2>

<column-name3>value</ column-name3>

<column-name4>value</column-name4>

</row>

</resultset>

Here some column can belong to diffrent table

look this thread to send data from multiple table

You can also use Stored Procedure, look this thread

Former Member
0 Kudos

Hi Venkat,

Here is the answer:

regards

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

To Select Data From Database you are using Sender JDBC right.

So write a select query that fetch data from two table like Select Employee.EmpId,Account.AccNo from Employee,Account.

Former Member
0 Kudos

Hi Dharamveer,

In my interface I need to retrieve data from two tables. Sender is JDBC adapter. can u guide me step by step How will i configure sander JDBC adapter.What is the structure of source data types.

Thanks & Regards

Venkat K

Former Member
0 Kudos

Hi Venkat,

You can use the Join statement or Union operation between two statements.

For Ex:

Select fields from Table1 where Cond1 union select fields from Table2 where cond2.

You can create the datatype based on the fields using in the query statement.

At the Sender adapter use the same statment above.

Regards

Goli Sridhar