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

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

    CREATE SYNONYM AB FOR SCHEMA.VERYLONGTABLENAME;

    Jorg

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