dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersJayant Tripathy
Ultimaterengan
Bhagabat
kirthiga
musathik
nitz
gopal
Minu
Pankaj Rajput
Rakesh Chaubey
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Resources » Code Snippets » C# Syntax

Uses of ltrim and rtrim


Posted Date:     Category: C# Syntax    
Author: Member Level: Silver    Points: 3



 


The following code sample illustrates the uses of ltrim and rtrim functions in SQL. Basically, ltrim function trims any spaces in the left of a string and rtrim trims in the right.


select * from CompanyDetails where LTRIM(RTRIM(REPLACE(company_name,' ','')))=LTRIM(RTRIM(REPLACE(@company_name,' ',''))) and country=@country
and state=@state and LTRIM(RTRIM(REPLACE(city,' ','')))=LTRIM(RTRIM(REPLACE(@city,' ',''))) and category=@category





Did you like this resource? Share it with your friends and show your love!


Responses to "Uses of ltrim and rtrim"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Export DataSet to Word files in ASP.NET with C#
    Previous Resource: List box
    Return to Resources
    Post New Resource
    Category: C# Syntax


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Uses of ltrim  .  Uses of ltrim and rtrim  .  Uses of rtrim  .  



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.