Re: Fast SQL Question



On 28 Nov 2005 11:52:10 -0800, Filter911 wrote:

>If I use like and I want to find all emails in hotmail that have at
>least one char before the '@' and after the '.'
>Is this the right command
>
>where EmailAddress like '%_@xxxxxxxxx%'

Hi Filter911,

Since my newsreaders automatically underlines everything with a @
cahracter embedded between two non-blanks (assuming it's an e-mail
address), I had to look twice to see if there were any underscore
characters in what you wrote. <g>

But yes - it is correct: % to signify zero or more characters; _ to
signify exactly one extra character, then the @hotmail. part, then
another _ for exactly one more character, followed by % for zero or more
extra characters.

If your column is fixed length, you'll have to use RTRIM to get rid of
the trailing spaces that are added to fill out the column. For varying
length character columns, there's no need to trim.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
.



Relevant Pages

  • Re: doubly-linked list & sorting
    ... char Emess; ... diff = -1; ...
    (comp.lang.c)
  • Re: Mathematics of the Enigma cipher?
    ... A character is mapped to an integer which becomes ... All the Rotors should be advanced ... char val3=R2.GetCharacterIndex; ... I thought the Reflector was fixed. ...
    (comp.programming)
  • Re: Mathematics of the Enigma cipher?
    ... A character is mapped to an integer which becomes ... All the Rotors should be advanced ... char val3=R2.GetCharacterIndex; ... I thought the Reflector was fixed. ...
    (comp.programming)
  • Re: Pointer
    ... require in input a pointer char: ... unsafe public static extern int OpenFile; ... What is it pointing to exactly, is it pointing to a "Unicode character" array or is it pointing to a "Single byte character" array or is it pointing to something else? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: memory leak?
    ... The issue is that in the TMS30C90, with 80-bit character types, this ... Yes, it is well-defined in terms of what happens, but in fact if EOF is a constant which ... is out-of-band for all char/unsigned char values (which is how it is done, ... to create a conforming implementation on a word-addressed machine. ...
    (microsoft.public.vc.mfc)