REPLACE more than 1 character string in a field

  • I've been trying to use REPLACE to update multiple strings in a field but only the first one will work, i.e.

    Declare @m char (100)

    Select

    @m, replace ( FieldA, '+', ' '),

    @m, replace ( @m, '%2E', '.'),

    Can anyone suggest any other way of trying to do this, or tell me what I am doing wrong?

  • Are you wanting this?

    SELECT replace(replace(FieldA, '+', ''), '%2E', '.')

    Looks like you want 4 outputs, if the above does not meet your needs then what are you starting with and what do you want to be the final result?

  • quote:


    Are you wanting this?

    SELECT replace(replace(FieldA, '+', ''), '%2E', '.')

    Looks like you want 4 outputs, if the above does not meet your needs then what are you starting with and what do you want to be the final result?


    Thanks I'm new to this, but that does the trick.

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

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