Updating multiple rows

  • I need to update a field in multiple rows with a bit of strinhg manipulation. I get an error though so I need to use some sort of loop or maybe even a stored procedure. Here is what I am trying to do...

    update pkgstatus

    set location=(left(location,14)+'E'+right(location,21))

    where type = '1' and location not like '\\frdkemsms01\e$%'

    I get the following error :

    Cannot update more than one row at a time on this table, PkgStatus.

    Basically I am trying to change a drive letter in the field, any ideas ? Many thanks.

  • thats a most unusual error message. I would hazard a guess the table has a trigger on it that prevents multiple updates.

    ---------------------------------------------------------------------

  • Is there a trigger on the table?

    Oops, didn't read all of George's response before posting. But at least we agree.

  • Thanks guys, that was the fix, could have sworn I posted a reply, sorry for that!

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

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