Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

How do I overcome ORA-00972: identifier is too long

by Bashirjulian (Initiate)
on Jul 18, 2001 at 07:07 UTC ( #97530=perlquestion: print w/replies, xml ) Need Help??
Bashirjulian has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I am connecting to Oracle 8, from a sparcstation with Perl version 5.005_02.

I am trying to run a SELECT statement but I get an error that the sixth field in my SELECT statement is too long.

DBD::Oracle::db prepare failed: ORA-00972: identifier is too long (DBD +: error possibly near <*> indicator at char 334 in ' SELECT xxx_xxx_x +xx_xxx, yyy_yyy_yyy_yyy_yyy, zzz_zzz_zzz_zzz, aaa_aaa_aaa_aaa_aaa, *>bbb_bbb_bbbbb_bbbbbbbb_bbbbbbbbb,
I know that this particular error indicates that my field name is more than 30 characters long,

But the problem is that the value on the DB is that long and there is no option to change the name on the DB.

How do I overcome this problem.

Thank you to al the Gurus who reply,



Replies are listed 'Best First'.
Re: How do I overcome ORA-00972: identifier is too long
by voyager (Friar) on Jul 18, 2001 at 08:05 UTC
    If I recall corrrectly, identifiers in Oracle *can't* be more than 30 characters. So if the column name can't be >30 characters, why does your SELECT reference a (presumably non-existent) column name that is > 30 characters?
Re: How do I overcome ORA-00972: identifier is too long
by jorg (Friar) on Jul 18, 2001 at 11:13 UTC
    Wild, early morning guess :

    Depending if u have enough rights to do so, you could create a synonym to that table with a shorter name ie



    "Do or do not, there is no try" -- Yoda

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://97530]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-01-20 15:01 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (226 votes). Check out past polls.