Results 1 to 2 of 2

Thread: Should be easy?

  1. #1
    Join Date
    Aug 2002

    Unhappy Unanswered: Should be easy?

    I am trying to write a stored procedure to update a temporary table. In my table are some isbn's that are in twice. I want to update those rows with a new value, but can't see how to do it without a cursor checking each row to see if it matches the previous isbn. Is there a better way? I know it doesn't work, but it would be nice if I could do something like;

    UPDATE #table
    SET source = 'Mixed'
    WHERE Count(isbn) > 1

    Thanks in Advance for any help,
    Carolyn Bamford

  2. #2
    Join Date
    Jul 2002


    You will have to use a Correlated Subquery. You will need a column on #table that will be used to select the rows to be updated not the count(*)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts