cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC error

Former Member
0 Kudos

Hi,

Iam doing a JDBC to JDBC scenario. In the JDBC Sender adapter to pull the data from Oracle database, iam using the following query

SELECT P1.EMPFNAME,P1.EMPLNAME,P1.EMPID,P1.COMPANYNAME,C1.EMPNAME,C1.EMPID FROM EMPLOYEE P1,COMPANY C1 WHERE P1.EMPID = C1.EMPID AND P1.EMPID IN (SELECT EMPID FROM COMPANY WHERE Rownum < 2 AND INITIAL = 'P')

Then iam getting the following error in the communication channel monitoring :

Database-level error reported by JDBC driver while executing statement 'SELECT P1.EMPFNAME,P1.EMPLNAME,P1.EMPID,P1.COMPANYNAME,C1.EMPNAME,C1.EMPID FROM EMPLOYEE P1,COMPANY C1 WHERE P1.EMPID = C1.EMPID AND P1.EMPID IN (SELECT EMPID FROM COMPANY WHERE Rownum < 2 AND INITIAL = 'P')'. The JDBC driver returned the following error message: 'java.sql.SQLException: ORA-00923: FROM keyword not found where expected '. For details, contact your database server vendor.

Can anybody please tell me what is the problem.....

Regards,

Radhika

Accepted Solutions (0)

Answers (6)

Answers (6)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Try to execute the Query in the reciever side and check whether it fetches the Value.

Regards

Agasthuri Doss

former_member189387
Active Contributor
0 Kudos

Hi ,

Please check the syntax of <b><i>Where IN claus</i></b>e of Sql.

Regards.,

V.Rangarajan

Former Member
0 Kudos

Hi

SQL Query doesnt seem to be correct

Tell us the error you get when you execute the same error in SQL editor

Thanks

Former Member
0 Kudos

Hi,

Try to use plain SQL statement instead two levels,, if not possible try to use stored procedures.

JDBC Stored Procedures - /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

Also see for additional information

JDBC - http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

multiple tables with JDBC - http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

JDBC Response /people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous

Chilla

Former Member
0 Kudos

are u able to execute the same querry in the database??...just check weather it is working there or not.

Thanks

Farooq.

Former Member
0 Kudos

No worry your querry is not correct...just check from SQL editor...if its work there then it has to work in XI...also u are getting ORA-00923: FROM keyword not found where expected..the error is related to database not with XI. so currect ur SQL statement:)

Thanks

Farooq.

**Rewards points if you find it useful

Former Member
0 Kudos

Hi Radhika,

Check this query in Database Query editor SQL Plus or so.

SQL Exception only comes when Syntax of query went wrong.

Rgds,

Shri