Page 1 of 1

ORA-00972 Identifier too long on deletion

Posted: Thu 23 Aug 2007 13:06
by pete
Hi,

When I perform a delete on a TOraQuery with a long primary key field name it comes up with the error: ORA-00972 Identifier too long.

The SQL that comes up in debug mode is:
----------
DELETE FROM DD_GROUPINGAPPLICATIONFIELD
WHERE
GROUPINGAPPLICATIONFIELDKEY = :Old_GROUPINGAPPLICATIONFIELDKEY

:Old_GROUPINGAPPLICATIONFIELDKEY(FLOAT,IN)=89
----------

I expect it's the Old_GROUPINGAPPLICATIONFIELDKEY variable being more than 30 chars. The TOraQuery is putting Old_ as a prefix pushing it over the 30 char limit. Is there a way around this rather than having to shorten the primary key?

Thanks
Pete.

Posted: Mon 27 Aug 2007 07:30
by Plash
You can include ROWID into your SELECT statement. In this case ROWID will be used in queries for delete and update.