Removing Spaces in varchar data

  • I have a column which has varchar data . This column data (close to 1000rows) has spaces in between . Eg : George Bush . I need to select this as GeorgeBush by removing the space here. How do I achieve this.

    Or How can I select George and Bush separately from this string and then concatenate to 'GeorgeBush' like this.

    Thanks

  • why can't you just replace all spaces in the string?

    update yourtable set yourcolumn = replace(yourcolumn,' ','')

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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