urgent question about strings - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

urgent question about strings

alibabaalibaba Posts: 11Member
I have a load of records that have double-spaces in the address. I want to create an sql query to take the spaces out and replace them with a comma and a space. I cant seem to write anything that will recognise a double-space. Does anyone know how to? Have tried using patindex and charindex but cant get it to work.

I hope someone can help

Dan

Comments

  • ShanooShanoo Posts: 32Member
    [b][red]This message was edited by Shanoo at 2004-2-27 5:13:44[/red][/b][hr]
    Try this SQL command:

    Update MyTable
    Set Address = Replace(Address, 'bb', ', ')

    Note: Please replace bb with two spaces.

    Happy programming ;)
Sign In or Register to comment.