Paul Sturrock wrote:Executing the same query? You've got two queries; how did you combine them into one?
select * from emp select * from customer
this query will give ORA-00933: SQL command not properly ended found exception
how it is working for you ?
krishna bala wrote:
select * from emp select * from customer
this query will give ORA-00933: SQL command not properly ended found exception
how it is working for you ?
Paul Sturrock wrote:Query Analyzer is making it appear that these two queries can be run as one. On its own its not valid SQL. If you want to run two queries in JDBC, run them as two PreparedStatements.
Paul Sturrock wrote:So how do you get the SQL for these queries? Can you explain a bit more about your logic?
Paul Sturrock wrote:OK, then you will need to perform the same logic Query Analyzer does whereby it parses the Transact SQL before running it. The easiest way to do this is to require proper statement ends (batch seperator in SQL Server speak). If you can't do that then you will need to parse the input with a Transact SQL grammar and break it down into seperate statements.