in reply to •Re: Inserting values in to table with DBI
in thread Inserting values in to table with DBI
gives....my $sthH = $dbh->prepare("INSERT INTO Disease_types (Adapted_code) SELECT ('A'+code) FROM Disease_types") or die "Couldn't prepare query: + ".$dbh->errstr; $sthH->execute() or die "Couldn't execute query: ".$sthH->errstr;
DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL +Server]Str ing or binary data would be truncated. (SQL-22001) [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been +terminated . (SQL-01000)(DBD: st_execute/SQLExecute err=-1) at Creating_table.pl +line 389 .
I know that I need to read up on SQL .... but when the Microsoft page:
.... tells me this, I just stuck.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlr +ef/ts_operator_3qov.asp
|
|---|