Re: ORA-00972: identifier is too long

From: Rick Wessman <Rick.WessmanNO_at_SPAMoracle.com>
Date: 26 Nov 2002 17:15:10 -0800
Message-ID: <as16au0c02_at_drn.newsguy.com>


In article <_eOE9.4645$NO.252147_at_news2.telusplanet.net>, "Ryan" says...
>
>Hi, I'm somewhat new to Oracle (8i). I'm attempting to update a LONG
>column on a single row. I keep getting the following error:
>
> The following error has occurred:
>
> ORA-00972: identifier is too long
>
>when attempting to use the following UPDATE query:
>
>UPDATE emailer SET QUOTE = "I realize you are ultra-busy. Who is your
>most-trusted advisor, with whom I can discuss if YOURCOMPANY can reap
>similar benefits, and see if OURCOMPANY can help with any of the projects
>you're working on now? RSVP, thanks FIRSTNAME,ryan" WHERE type =
>'callaction' AND name = 'advisor'
>
>What am I doing wrong?
>
>On a side note, some of the rows in the QUOTE column contain double-quotes.
>Is updating these going to be a problem? Do I need to escape them first?
>
>Thanks
The double quotes are the problem. When something is double-quoted, Oracle treats its as an identifier. Since your string is longer than 31 characters, Oracle throws an error because identifiers can only be 31 characters.

You need to surround the string with single quotes as in:

UPDATE emailer SET QUOTE = '"I realize you are ultra-busy. Who is your most-trusted advisor, with whom I can discuss if YOURCOMPANY can reap similar benefits, and see if OURCOMPANY can help with any of the projects you're working on now? RSVP, thanks FIRSTNAME,ryan"' WHERE type = 'callaction' AND name = 'advisor'

Oracle will then treat it as a string and the error should go away.

                                         Rick

>
>
>--
>R
>
>
>
>--
>R
>
>
                                Rick Wessman
                                Oracle Corporation

     The opinions expressed above are mine and do not necessarily reflect
                         those of Oracle Corporation.
Received on Wed Nov 27 2002 - 02:15:10 CET

Original text of this message