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









Related Tutorials/Questions & Answers:
Does java supports queries with references/Table alias?
Java Queries
Advertisements
which version of java supports util.regex
3 queries on java class
personal name aliase from the web
Does finally always execute in Java?
Package does not exist.. - Java Beginners
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
to add on to my queries - Java Beginners
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 java does not support multiple inheritance - Java Beginners
[Mini-Project] Develop a programmer's editor in Java that supports syntax highlighting, compilation support, debugging support, etc.
does any one have sudoku in java - Java Beginners
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 org.apache.lucene - lucene-queries version 9.2.0 is released. Learn to use lucene-queries version 9.2.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.11.1 is released. Learn to use lucene-queries version 8.11.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.4.2 is released. Learn to use lucene-queries version 9.4.2 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 6.6.1 is released. Learn to use lucene-queries version 6.6.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 5.4.1 is released. Learn to use lucene-queries version 5.4.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.1.0 is released. Learn to use lucene-queries version 9.1.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.0.0 is released. Learn to use lucene-queries version 9.0.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 4.9.1 is released. Learn to use lucene-queries version 4.9.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.11.0 is released. Learn to use lucene-queries version 8.11.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.4.0 is released. Learn to use lucene-queries version 9.4.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.10.1 is released. Learn to use lucene-queries version 8.10.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.4.1 is released. Learn to use lucene-queries version 9.4.1 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.10.0 is released. Learn to use lucene-queries version 8.10.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.11.2 is released. Learn to use lucene-queries version 8.11.2 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 9.3.0 is released. Learn to use lucene-queries version 9.3.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.7.0 is released. Learn to use lucene-queries version 8.7.0 in Maven based Java projects
Maven dependency for org.apache.lucene - lucene-queries version 8.6.3 is released. Learn to use lucene-queries version 8.6.3 in Maven based Java projects

Ads