Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6064355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:16:16+00:00 2026-05-23T09:16:16+00:00

I am having some rows in table with some unusual character. When I use

  • 0

I am having some rows in table with some unusual character. When I use ascii() or unicode() for that character, it returns 63. But when I try this –

update MyTable
set MyColumn = replace(MyColumn,char(63),'') 

it does not replace. The unusual character still exists after the replace function. Char(63) incidentally looks like a question mark.

For example my string is ‘ddd#dd ddd’ where # it’s my unusual character and

select unicode('#')

return me 63.But this code

declare @str nvarchar(10) = 'ddd#dd ddd'
set @char = char(unicode('#'))
set @str = replace(@str,@char,'')

is working!

Any ideas how to resolve this?

Additional information:

select ascii('�') returns 63, and so does select ascii('?'). Finally select char(63) returns ? and not the diamond-question-mark.

When this character is pasted into Excel or a text editor, it looks like a space, but in an SQL Server Query window (and, apparently, here on StackOverflow as well), it looks like a diamond containing a question mark.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:16:17+00:00Added an answer on May 23, 2026 at 9:16 am

    Not only does char(63) look like a ‘?’, it is actually a ‘?’.

    (As a simple test ensure you have numlock on your keyboard on, hold down the alt key andtype ’63’ into the number pad – you can all sorts of fun this way, try alt-205, then alt-206 and alt-205 again: ═╬═)

    Its possible that the ‘?’ you are seeing isn’t a char(63) however, and more indicitive of a character that SQL Server doesn’t know how to display.

    What do you get when you run:

    select ascii(substring('[yourstring]',[pos],1));
    --or
    select unicode(substring('[yourstring]',[pos],1));
    

    Where [yourstring] is your string and [pos] is the position of your char in the string

    EDIT

    From your comment it seems like it is a question mark. Have you tried:

    replace(MyColumn,'?','') 
    

    EDIT2

    Out of interest, what does the following do for you:

    replace(replace(MyColumn,char(146),''),char(63),'')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to print some objects in a table having 2 rows per object,
I'm having some serious performance issues with a multi-million row table that I feel
I'm having some issues with this layout and having a link that displays on
I am having some difficulty setting layout parameters of table rows (containing text views).
I need to update some rows in a DB table. How I identify the
I have been having some trouble to select the rows of my table which
I'm having some issue with this query that seems to be too slow... SELECT
I'm having some problems. I am trying to get a table to update, however
Having some issues getting my head around the differences between UTF-8, UTF-16, ASCII and
I'm having some trouble with some javascript. I'm using jQuery to dynamiclly add rows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.