Solved

ORA-00972: identifier is too long

Posted on 2013-06-07
11
807 Views
Last Modified: 2013-06-10
In trying to combine two queries, utilizing Toad Data Point Virtual Views with this SQL, I get this message:  Not sure why?  

Please note that my two queries, "ADT" and "PX" already include my where statements.  

I just want to combine the data from these two queries to export into one report.

SELECT  ADT.HAR
      , ADT."PAT NAME"
      , ADT.ATTENDING_PROV_ID
      , ADT.DISCH_DATE_TIME
      , ADT.PRIM_SVC_HA_C
      , ADT.NAME
      , ADT.INP_ADM_DATE
      , ADT.DISCH_DISP_C
      , ADT.PAT_MRN_ID
      , ADT.DRG_MPI_CODE
      , ADT.DRG_REIMBURSEMENT
      , ADT.HOSP_ADMSN_TYPE_C
      , ADT.ABSTRACT_USER_ID
      , ADT.DX_NAME
      , ADT.REF_BILL_CODE
      , ADT.NAME1
      , PX.PROC_DATE
      , PX.REF_BILL_CODE
      , PX.PROCEDURE_NAME
FROM
      {{ADT}} ADT
      LEFT OUTER JOIN
      {{PX}} PX
      ON (ADT.HAR = PX.HSP_ACCOUNT_ID)

Any ideas are greatly appreciated!
0
Comment
Question by:SheriReyna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +1
11 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 200 total points
ID: 39230326
Either the generated {{ADT}} or {{PX}} contain to many characters.
Perhaps they should not already include the where statements.
:p
0
 

Author Comment

by:SheriReyna
ID: 39230411
Can you clarify the "generated queries containing too many characters?  Do you mean the table name (fields) that the views are extracted from contain too many characters, or that the query itself has too many?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39230500
One or more  "identifiers" in those fields may be too long ( > 32 char).
Sometimes it's a missing space between two identifiers...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 175 total points
ID: 39231020
i.e. the problem is hidden in the contents of  {{ADT}} or {{PX}}
something in one (or both?) of these has an "identifier" that is too long (> 30 chars)
(which might be an alias)

http://ora-00972.ora-code.com/

http://www.dba-oracle.com/sf_ora_00972_identifier_is_too_long.htm
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39232398
Exactly what I said.
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39232421
not quite, a difference of 2, but we certainly agree on the source of the problem.
(and your tip on a missing space is a really good one, particularly relevant if it's dynamic sql)

I was really just adding the URL's to be honest as I thought they might help.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39232786
Do both the 'source' queries for {{ADT}} and {{PX}} run without problems?
0
 

Author Comment

by:SheriReyna
ID: 39234735
Thanks all - Both source queries do run without problems.  I did create a field alias though for the longer columns for display purposes and renaming fields for clarity sake.   For example, HSP_ACCOUNT.HSP_ACCOUNT_NAME AS "PAT NAME" is the AS . . . . included in the character length too?
0
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 125 total points
ID: 39234841
Don't think so, ORA-00972 can be caused by column, alias, or table names which are too long. Can you try renaming your "PAT NAME" alias to PAT_NAME instead?
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39234900
Would you like to comment on how you solved the issue? Your last comment ends with a question?
0
 

Author Comment

by:SheriReyna
ID: 39235189
I am currently working to change the VARCHAR on the columns to 34 rather than 30 or 32, and attempting to identify any "empty" spaces within the SQL and changing my aliases as you indicated above.  I will keep you posted as to what works.  Thanks for all of your help!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dbms_crypto.decrypt   errors out 6 43
Oracle Insert not working 10 48
Database Design Dilemma 6 65
Checking for column width 8 39
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question