cancel
Showing results for 
Search instead for 
Did you mean: 

** Is it possible to give select command from multiple tables in JDBC

jegathees_waran
Active Participant
0 Kudos

Hi Friends,

Is it possible to give the select command to select data from multiple tables directly in the 'Query SQL statement' in JDBC sender communication channel ? (Instead of Stored Procedure)

Thanking you.

Kind Regards,

Jeg P.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

here is a sample:

Table #1

Header

Name EmpId Status

Jai 5601 0

Karthik 5579 0

Table #2

Name Contactnumber

Jai 9894268913

Jai 04312432431

Karthik 98984110335

Karthik 04222643993

select Header.Name, Header.EmpId, Item.Contactnumber from Header,Item where Header.Name = (select min(Header.Name) from Header where Header.Status = 0) and Header.Name = Item.Name

Regards Mario

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

This is very much possible.

You can either use JOIN statement in you select or even you try STORED PROCEDURE to achieve the same.

Regards

Ramesh P

former_member189440
Participant
0 Kudos

Hi friends, i need help for sender jdbc adapter. actaully my scenario is i ahve to take data from 2 tables and insert the data from 2tables into another database of having the same 2 tables. how to configure in sender adapter. i have written the select query. but i need the update query statement in sender jdbc adapter.please help me.

former_member193376
Active Contributor
0 Kudos

Hi

Yes, you can give the select command to select data from multiple tables directly in the 'Query SQL statement' in JDBC sender communication channel. You can either use nested queiries or joins.

Thanks

Saiyog

Former Member
0 Kudos

Hi,

You can fetch the data from multiple tables using Joins.

Here is one of the features of JDBC sender adapter answering your query as provided by help.sap.com.

db.processDBSQLStatement=<SQL-Select-Statement>

Either specify a valid SQL SELECT statement to select the data to be sent from the specified database, or specify an SQL EXECUTE statement to execute a stored procedure that contains exactly one SELECT statement. The expression only needs to correspond to the SQL variant supported by the respective JDBC driver; so it can also contain table JOINs, for example. This specification is mandatory.

Thanks,

Bala

Former Member
0 Kudos

Hi,

Why not, we can write any type of select statement including the joins also.

Its like a general SQL statements, how you can write the SQL statements in the Oracle that all statements we should write here.