Help - why is this simple update not working?

  • I don't understand this. It is not the first update I'm doing and this seems trivial, but somehow I must not be seeing a detail here?

    update dispog

    set dispog.id_stammlief=0

    where id_stammlief =435

    Result:

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, = or when the subquery is used as an expression.

    The statement has been terminated.

  • Are there any triggers defined on that table?

    --Ramesh


  • Ok, case closed - many thanks for asking. I really forgot these triggers, but they guys only support updating one record at a time, so that explains it. It's a shame that the msgs do not give any hints about errors in triggers...

  • Michael Baas (1/7/2009)


    Ok, case closed - many thanks for asking. I really forgot these triggers, but they guys only support updating one record at a time, so that explains it.

    That's a badly written trigger. Want a hand fixing it?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

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