#---SQL to change the column data for ($count = 0; $count < $EasySetDataCount; $count++) { #------Put quotes around data if needed $QuotedNewEasySetDataName = $dbh->quote($NewEasySetDataNames[$count]); $QuotedEasySetDataName = $dbh->quote($EasySetDataNames[$count]); #------Create SQL statement $sqlStatement = "UPDATE ".$ChosenEasySetTableName." SET ".$ChosenEasySetColumnName." = ".$NewEasySetDataNames[$count]." WHERE ".$ChosenEasySetColumnName." = ".$EasySetDataNames[$count]; #------print it out for debugging print $sqlStatement; #------prepare and execute $sqlCmd = $dbh->prepare( $sqlStatement ); $sqlCmd->execute() or die "SQL Error: $DBI::errstr\n"; } #### Uncaught exception from user code: SQL Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Other'. (SQL-42S22) [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL-42000)(DBD: st_execute/SQLExecute err=-1) at C:\temp\EasySetRenameTool.pl line 155 Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at C:\temp\EasySetRenameTool.pl line 155, line 5. UPDATE AI_ESP SET Race = red WHERE Race = Other