Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011

    Unanswered: How to have multiple update statements in the same stored procedure?


    Is it possible to combine multiple operations in the same stored procedure? Want to eliminate text via the following:

    UPDATE expireds_new
    SET Address=REPLACE(Address,'Unit','')

    And repeat for "#", "lot", "Spc", "Apt", etc

    Can I do this all in one, or do I need to create separate ones for each?

    Thanks for any and all help!

  2. #2
    Join Date
    Jul 2015
    If I am reading you correctly, this is probably what you want

    UPDATE expireds_new
    SET Address=replace(replace(replace(replace(REPLACE(Ad dress,'Unit',''), '#'), 'lot'), 'Spc'), 'Apt')

Posting Permissions

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