• Post Reply Bookmark Topic Watch Topic
  • New Topic

ORA-00972: identifier is too long at select statement  RSS feed

Santosh Kumar
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody tell me why am i getting this exception while selct query.My table name is focused_Inventory_Unit_type(it is 27 character long).But according to me table name can be 30 characters long maximum.
Columns name are
I dont think even column names are too long.
So can u tell me what else can be the reason.
below i am pasting the exception i am getting.
santosh kumar
java.sql.SQLException: ORA-00972: identifier is too long
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.parseExecuteDescribe(TTC7Protocol.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at com.softbrands.destiny.fitterMain.FocussedInventory.getHotelRoomTierData(FocussedInventory.java:183)
at com.softbrands.destiny.fitterMain.DobseDAO.assignToSummaryItem(DobseDAO.java:2556)
at com.softbrands.destiny.fitterMain.DobseDAO.getItemProcessList(DobseDAO.java:984)
at com.softbrands.destiny.fitterMain.DobseSBBean.ExecuteFitterFinder(DobseSBBean.java:747)
at com.softbrands.destiny.fitterMain._sk_DestinyEJB_DobseFitterBean.invoke(_sk_DestinyEJB_DobseFitterBean.java:1346)
at com.sybase.CORBA.local.Socket.call(Native Method)
at com.sybase.CORBA.local.OutputStream.write(OutputStream.java:29)
at com.sybase.CORBA.iiop.Connection.invoke(Connection.java:3332)
at com.softbrands.destiny.fitterMain.DobseSBRemote_Stub.ExecuteFitterFinder(DobseSBRemote_Stub.java:1749)
at com.softbrands.destiny.fitterMain.DobseClient.getOfferList(DobseClient.java:452)
at com.sybase.jsp.destiny_0005fswp_0005fOffers$jsp._jspService(destiny_0005fswp_0005fOffers$jsp.java:564)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:241)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:421)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:513)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sybase.jaguar.servlet.JagServlet.service(JagServlet.java:612)
at com.sybase.jaguar.servlet.JagRequestDispatcher.service(JagRequestDispatcher.java:856)
at com.sybase.jaguar.servlet.JagWebResource.service(JagWebResource.java:85)
at com.sybase.jaguar.servlet.JagFilterChain.doFilter(JagFilterChain.java:125)
at com.sybase.jaguar.servlet.ServletEngine.service(ServletEngine.java:580)
at com.sybase.jaguar.servlet.ServletServiceImpl.doService(ServletServiceImpl.java:52)
at com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:148)
2003-04-18 21:41:07,154 DEBUG [com.softbrands.destiny.fitterMain.DobseDAO] (sortFocussedInventoryArrays:5590) -
Mark Spritzler
Posts: 17309
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it is only 29 characters, but here is the Oracle documentation on the ORA-0972 error
Oracle Product Document Library (C) Oracle Corporation
Manual: Database Error Reference: A90202-02

ORA-00972 identifier is too long
Cause: The name of a schema object exceeds 30 characters. Schema objects are tables, clusters, views, indexes, synonyms, tablespaces, and usernames.
Action: Shorten the name to 30 characters or less.

Hope that helps.
Carl Trusiak
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try printing the actually string for your PreparedStatement. It could be getting formatted wrong resulting in the error. If a name is too long, Oracle doesn't check to see if it's a valid name to give the "Invalid Column Name" or the "Invalid Table Name" Errors.
Chris Fellows
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had this same issue an Oracle9i db. End problem was misnaming columns in my sql.

ex. insert into aTable (ACTIVE_FLAG) values ('Y')

instead of insert into aTable(ACTIVEFLAG) values ('Y')

small difference but nothing to do with incorrectly named table, sequence, etc.
Philip Thamaravelil
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will also see this exception when performing sql inserts/updates with (") instead of (') encapsulating your varchar column values.

Good luck.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!