Does java supports queries with references/Table alias?

Does java supports queries with references/Table alias?

Hello,

I have an Oracle query:SQL> select t.TopicName, p.NumberofPolls from EMSTopic t,EMSPoll p where t.TopicID = p.TopicID and t.TopicName= 'Sybase';

which is working fine in SQL editor but not working programatically. I am getting runtime error:

java.sql.SQLException: ORA-01427: single-row subquery returns more than one row

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)
at com.ibm.sample.joinQuery.GetResults(joinQuery.java:37)
at com.ibm.sample.Result.main(Result.java:9)

Can anyon eplease help me resolve this?

Thanks in advance!

View Answers

Ads









Related Tutorials/Questions & Answers:
Does java supports queries with references/Table alias?
which version of java supports util.regex
Advertisements
Java Queries
3 queries on java class
personal name aliase from the web
Does finally always execute in Java?
Does finally always execute in Java?
Does finally always execute in Java?
Does finally always execute in Java?
What does core Java include?
Does Java support multiple Inheritance?
Does Java support multiple Inheritance?
Does Java support multiple Inheritance?
Does Java support multiple inheritance?
How does it take to learn Java
How does it take to learn Java
How does it take to learn Java
Why does Java not support operator overloading?
How does the Java for each loop work?
How does Java handle integer overflows and underflows?
What is a pointer and does Java support pointers?
Does the object type known during compilation in Java?.
Why does Java provide both abstract class as well as interface
Execute SQL Queries with Java Application
Maven dependency for org.apache.lucene - lucene-queries version 8.8.0 is released. Learn to use lucene-queries version 8.8.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.8.1 is released. Learn to use lucene-queries version 8.8.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.8.2 is released. Learn to use lucene-queries version 8.8.2 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.9.0 is released. Learn to use lucene-queries version 8.9.0 in Maven based Java projects
Maven dependency for com.eventsourcing - eventsourcing-queries version 0.4.3 is released. Learn to use eventsourcing-queries version 0.4.3 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 6.6.4 is released. Learn to use lucene-queries version 6.6.4 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 4.5.1 is released. Learn to use lucene-queries version 4.5.1 in Maven based Java projects

Ads