on 04-25-2008 7:14 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes,..chandra..if it is goint to be from five different database , we definitely cant do with a single CC
regards
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.