DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Humair Guest

    reduce spaces between data


    hi
    i have table named t1 having column

    a b
    ----------------
    1 a s d
    2 c v b
    3 s d f g h
    4 d f
    5 b g ty gggg

    then i want

    display a record of column "b"
    like this

    asd
    cvb
    sdfgh
    df
    bgtygggg

    so on & so on

    basicaly i am reduce spaces between data

    any method to reduce spaces in sql server only?
    bye

  2. #2
    Paul Mc Guest

    Re: reduce spaces between data


    G'day Humair.


    >a b
    >----------------
    >1 a s d
    >2 c v b
    >3 s d f g h
    >4 d f
    >5 b g ty gggg


    Try this:

    Select REPLACE([b], ' ', '') as B_NoSpaces From t1

    HTH,
    Cheers,
    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links