cancel
Showing results for 
Search instead for 
Did you mean: 

reg:JDBC adapter

Former Member
0 Kudos

Is it possible to fetch the data from 5 different database tables using a sngle CC where JDBC is configured on sender side.if yes how?

points will be rewarded for correct answers immediately....

regards

chandrakanth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandra,

As far as i know we can connect to one DB with One CC

Why because in Sender CC we have to provide the DB Details and User + Pwd for one DB only. We dont have the provision to provide the 5 DB details in Single CC

So i think not possible

We will wait for other experts replys

Regards

Seshagiri

Edited by: N V Seshagiri on Apr 25, 2008 8:18 AM

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello ,

You either use a select query with join or a stored procedure which will contain the logic to extract the data from multiple tables. But, the limitation in case of stored procedure is u can hv only one selct query in it.

JDBC adapter will be able to holdany select query irrespective of how long it is.

Sample code

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>

Check these two threads...

***********Reward points,if found useful

Former Member
0 Kudos

Chandra,

Though I'm not sure about the reliability and efficiency of my idea, even its feasability, but if JDBC allows dynamic settings of jdbc url/usr/pwd, you could process a first (leading) sql message in your CC and also perform additional select as db lookups, changing CC settings to target db's attributes accordingly ..

I've never tried such, I'm not sure it is recommended anyway

Chris

PS : why trying to perform all theses statements thru one single CC ?

Former Member
0 Kudos

yes,..chandra..if it is goint to be from five different database , we definitely cant do with a single CC

regards

krishna

Former Member
0 Kudos

Hi

You can give the Select Query as,

SELECT TAB1.field1 as fld1 , TAB1.field2 as fld2 , TAB2.FIELD3 AS FLD3, TAB2.FEILD4 AS FLD4 WHERE <<FOLLOWED BY A VLID WHERE CONDITION>>

For such a query, the datatype will be ,

<resultset> 1..1

<row> 0 to UB

<fld1>column-value</fld1>

<fld2>column-value</fld2>

<fld3>column-value</fld3>

<fld4>column-value</fld4>

</row>

</resultset>

regards

krishna