Re: Special Character



On Wed, 24 May 2006 13:04:01 -0700, dtatham wrote:

Is there anyway to query out the special character ' i.e. foot. We have a
table in a database that has data in it containing the foot and inch
characters. We need to remove these and I can find using 'like' with the "
inch but can't with the ' foot.

Hi dtaham,

To include the single quote character in a character string, you'll have
to double it.

For example:

DECLARE @var char(20)
SET @var = 'O''Neil'
PRINT @var

Result: O'Neil

--
Hugo Kornelis, SQL Server MVP
.



Relevant Pages

  • Re: Armenian, Sumerian, Burushaski, and Turkic languages
    ... - sort of a blank character, ... maybe it really is a Norwegian thing. ... Det var en liten gutt som gikk og græt og var så lei, ... med blanke ark og fargestifter tel. ...
    (sci.lang)
  • Re: javascript compression
    ... var RingBellOnFatalError = false; ... returns a string detailing the line and char position of default ... read a character from line buffer, ... // tokens - an array of predifined tokens ...
    (microsoft.public.scripting.jscript)
  • Re: Are JavaScript strings mutable?
    ... low-level languages in JavaScript there is not direct relation byte ... character. ... In the particular JScript String object is layer on ... var iterations = 30000; ...
    (comp.lang.javascript)
  • Re: FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM?
    ... loop to be constant during that loop, ... function rTrim{var k = str.length-1 ... The character l should not be used where it might be, even momentarily, ... for symmetry trimR, matching trim in case. ...
    (comp.lang.javascript)
  • Re: jslint doesnt like my syntax for conditional object creation
    ... to restore 3rd party context by few errors. ... Problem at line 1 character 27: Var Serious was used before it was ... for JSLint and discussed the motivation for its error and warning ...
    (comp.lang.javascript)