I am on the very last step of my Perl script.  Have read a bunch of records
into arrays, using a 'select table handler' with DBI.  Now I want to cycle
back through the data in those arrays, and based on the value of one
specific field, update a field in the corresponding database record.

Because I need to use one of the array elements as part of the WHERE clause
of the UPDATE statement, I built the SQL statement in a scalar first, then
passed that scalar to the "$dbh->do()" command, as follows.  (Due to the
nature of the error message, I'm going to use exact table and var names):

      $sql_cmd = "\"UPDATE Chunkmail SET Contribute_flag=1 WHERE
Chunkmail_ID=" . @contribute_flag[$_] . "\"";
      $rslt = $dbh->do($sql_cmd);       

Executing the "do" causes the following error:
DBD::Oracle::db do failed:  ORA-00972: identifier is too long (DBD ERROR:
OCIStmtExecute) [for Statement ""UPDATE Chunkmail SET CONTRIBUTE_FLAG=1
WHERE CHUNKMAIL_ID=1""] at testprog.pl line 161.

Is is complaining that my Update statement is too long??  If not, what?  If
so, do I need to make the names of my arrays shorter?  What is the limit?

Thank you--hope someone else is still at work!

Laurie A. Vien
Sr. Programmer/Analyst
Ben & Jerry's Homemade, Inc.

Reply via email to