wood burning stoves 2.0*
The moose likes Oracle/OAS and the fly likes ORA-00972: identifier is too long at select statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "ORA-00972: identifier is too long at select statement" Watch "ORA-00972: identifier is too long at select statement" New topic
Author

ORA-00972: identifier is too long at select statement

Santosh Kumar
Greenhorn

Joined: Jan 03, 2002
Posts: 28
hi
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
FIT_ID, FCI_ID, FAC_GRP_CODE, FAC_CODE, UT_CODE, FIT_DATE, FIT_LOS, FIT_SEQ_NO
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.
thanks
regards
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) -


Santoh Kumar<br /> India<br />SCJP 1.4 <br />SCWCD 1.4
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Chris Fellows
Greenhorn

Joined: Jan 26, 2006
Posts: 1
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

Joined: Feb 09, 2006
Posts: 99
You will also see this exception when performing sql inserts/updates with (") instead of (') encapsulating your varchar column values.

Good luck.
 
 
subject: ORA-00972: identifier is too long at select statement