cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC

Former Member
0 Kudos

Hi,

I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??

I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.

Regards

Kumar

Accepted Solutions (1)

Accepted Solutions (1)

prabhu_s2
Active Contributor
0 Kudos

Below is code used in the query part of JDBC adapter. You can very use SP also.

<i><b>SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP

FROM <Table_1> INNER JOIN <Table_2> on

<Table_1>.CARDNO = <Table_2>.CARD

where REC_DAT = <condition>

union

SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP

FROM <Table_1> INNER JOIN <Table_2> on

<Table_1>.CARDNO = <Table_2>.CARD

where REC_DAT = <condition></b></i>

Have removed some conditions. You can have this for reference,

thkx

Prabhu

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

Yes it can be possible ,please see the following links

/people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes

https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all

Regards

Chilla..

Former Member
0 Kudos

Hi,

yes you can achieve this...please refer this below link

http://help.sap.com/saphelp_nw2004s/helpdata/en/34/ee1940d4558f5ce10000000a155106/frameset.htm

Thanks and Regards,

Chandu.

Former Member
0 Kudos

Hi,

You can write a stored procedure to fetch data from multiple tables and execute the same in the sender CC.

Regards,

Sudheer.

prabhu_s2
Active Contributor
0 Kudos

Hi palnati kumar

Make use of <b>joins</b> in the query (JDBC adapter). Thru this you can get data from more than one table.

Thkx

Prabhu