u need two select adapters…
step-1
in the first one select class from table 1.if u are getting a result set.from this step
step 2.
loop over the result set from above .and for every class get the corresponding SNames… and perform what ever logic u are supposed to …
if u are really good at sql …u can even create just one stored procedure which does all the above logic and returns the result…
Be careful with your terminology. For people new to IS and the JDBC adapter, the difference between “adapter” and “service” is critical. The solution may indeed need two adapters, if the tables are in different databases. But based on the description, it’s more likely that only one adapter is needed and just one adapter service which does a join is needed.
rob,
right i was too casual in saying adapters… i actually meant adapter services…
so , i guess even doing a join should work.But if he is really novice in sql ,then using two different adapter services whould do the trick,
no matter which approach he takes ,there shouldnt be any problem .
thanks
sri
Hi all, i have a small problem.
I wrote an Adapter service for selecting an ID depending on some conditions.It works for few inputs , but doesnt work for few inputs.
What would the reason be and where its going wrong ?
The connection is right, pointing to right database. If anyone would have passes through this situation before plz tell me the solution.
Thankyou
Create a custom SQL Adapter Service and enter the following sql
Select SName from Table2 where table1.sno=table2.sno and table1.class=‘?’
and create an input parameter called Class of type String. Now Invoke the adapter service in yr flow and pass the value for the class.
This should solve your problem.
Hi Waseem,
Create a JDBC Connection. Create a Adapter Service, using this connection and DynamicSQL template with sql as ${sql}. Set the output variable as SName, OutputJDBCType VARCHAR and OutputFieldType as java.lang.String. run this service and when asked, supply the SQL posted above.
hi all,
please do the following
iam sure u will get result
create a adapter connection, create a adapter service(custom SQL adapter service) In the input JDBC type give varchar, in input field type give java.lang.string and in input field class(column in table) In the output JDBC type give varchar, in output field type give java.lang.string and in output field SName(column in table) in SQL Select SName From Table2 where table2.sno = (select sno from table1 where table1.class = ?)