Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

oracle error

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi all,

I am trying to execute the following query on oracle Db.
The query doesn't have any errors ,as when I run it outside my java program it runs fine and returns the result.It gives the following message when I try to run it from my java code.
The moment I remove the "upper" word it runs fine.

Can some one please let me know what is the problem.
Because of this error I am stuck and can't test my code further.

please answer to my question.

thanks,
trupti





The query received from Database Query is SELECT upper(CYCLE_CLOSE_FLAG),ACCESSIBLE_FLAG FROM SALES_RPT WHERE AGENCY_NBR = ? AND RPT_PERIOD_END_DATE = ?
05646222
2004-07-04
The result set is:weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResul
tSetImpl@8b
java.sql.SQLException: Invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.j
ava:6240)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl
.java:1557)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:148
2)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImp
l.getString(Unknown Source)
 
author & internet detective
Posts: 42173
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Trupti,
Please don't cross-post the same question in multiple forums. Discussion is in this thread
 
    Bookmark Topic Watch Topic
  • New Topic