How to remove unwanted ASCII character in a SQL column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benchpolo
    New Member
    • Sep 2007
    • 142

    How to remove unwanted ASCII character in a SQL column

    I have a column that holds a character 'à', and I'm not able to filter this out from TSQL query.

    Data Sample: PCP12345à

    Code: LTRIM(RTRIM(REP LACE,REPLACE(cm .provid,' ',''),'à',''))

    Thanks.
    Last edited by NeoPa; Oct 19 '11, 12:16 AM. Reason: Added inline code tags
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Try using the char function. Something like:

    Code:
    replace(cm.provid,char(133),'')
    Happy Coding!!!


    ~~ CK

    Comment

    • benchpolo
      New Member
      • Sep 2007
      • 142

      #3
      okay i figured it out.. I have layers of query.. i should've used the replace(cm.prov id,char(133),'' ) in the first layer instead of the last layer. Thanks for the tip ;)

      Comment

      Working...