Update error

  • i have this simple update statement that always work fine,

    UPDATE dbo.tbPosizioni

    SET OperatoreInModifica = Null

    WHERE    

     dbo.tbPosizioni.OperatoreInModifica = @Operatore

    but from some day return this error:

    Subquery return more than 1 value. This is not allowed.

    It's so strange that an other statements works fine on an other table

    UPDATE dbo.tbOrdiniTestata

    SET OperatoreInModifica = null

    WHERE

     dbo.tbOrdiniTestata.OperatoreInModifica = @Operatore

    Can be a problem on first table????

     

    thanks

     

  • Are you sure that is the only query you are running? Is it part of a larger script? There's no subquery there, so the error message doesn't make sense.

    -SQLBill

  • i run this query within a stored with other statements,

    but i'm sure of this error, because, i ran it lonely in QueryAnalyzer.

  • Check the triggers of that table...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • BINGO!!

    there's a trigger on Update for this table that sometimes return more than one row.

    thank you

    bye bye

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply