Re: 512 error in delete statement
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sat, 1 Mar 2008 23:43:08 +0000 (UTC)
(phdscholar80@xxxxxxxxx) writes:
I have a piece of code that uses the db-library with sql server
2000/2005 and runs the following delete statement:
Beware that DB-Library is deprecated, and the version after SQL 2008
will not permit connections for DB-Library. Also, with DB-Library
you don't access to a lot of the new functionality added in SQL 7 and
later.
on TABLE1, uploads data into TABLE1 through bulk loading, calls a
stored procedure that uses the data, and then deletes the data through
the SAME delete statement with EXACTLY the same parameter values. The
first delete statement is always successful, but the second statement
intermittently gives the following error:
0,0,MS SQL Server Message :
SQL Server message 512, state 1, severity 16:
Subquery returned more than 1 value. This is not permitted when the
subquery follows =, !=, <, <= , >, >= or when the subquery is used as
an expression.
As Dan said, the cause is likely to be found in a poorly written trigger.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- 512 error in delete statement
- From: phdscholar80
- 512 error in delete statement
- Prev by Date: Re: help with stored procedure which returns an OUTPUT value
- Next by Date: Re: help with stored procedure which returns an OUTPUT value
- Previous by thread: Re: 512 error in delete statement
- Next by thread: help with stored procedure which returns an OUTPUT value
- Index(es):
Relevant Pages
|