Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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,

Regards,

Julian

Comment on How do I overcome ORA-00972: identifier is too long
Download Code
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

    CREATE SYNONYM AB FOR SCHEMA.VERYLONGTABLENAME;

    Jorg

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://97530]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2014-08-21 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls