Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to cut space in middle word

How to cut space in middle word

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LTMKH
    wrote on last edited by
    #1

    Hello , I want to cut out all space in my text "Where are you now?", so i want this"Whereareyounow?" Can any want help me (SQL)?

    N 1 Reply Last reply
    0
    • L LTMKH

      Hello , I want to cut out all space in my text "Where are you now?", so i want this"Whereareyounow?" Can any want help me (SQL)?

      N Offline
      N Offline
      Niladri_Biswas
      wrote on last edited by
      #2

      Try this

      declare @str as varchar(100)
      set @str = 'Where are you now?' -- original data
      select REPLACE(@str,' ' ,'') as RemoveSpace

      Output:

      RemoveSpace
      Whereareyounow?

      This will even work for 'Where        are    you      now?' Let me know in case of any concern. :)

      Niladri Biswas

      modified on Monday, November 9, 2009 11:42 PM

      L 1 Reply Last reply
      0
      • N Niladri_Biswas

        Try this

        declare @str as varchar(100)
        set @str = 'Where are you now?' -- original data
        select REPLACE(@str,' ' ,'') as RemoveSpace

        Output:

        RemoveSpace
        Whereareyounow?

        This will even work for 'Where        are    you      now?' Let me know in case of any concern. :)

        Niladri Biswas

        modified on Monday, November 9, 2009 11:42 PM

        L Offline
        L Offline
        LTMKH
        wrote on last edited by
        #3

        now i reach my result..thanks alot

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups