Re: Fast SQL Question
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 23:36:46 +0100
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)
.
- References:
- Fast SQL Question
- From: Filter911
- Fast SQL Question
- Prev by Date: Re: Derived column design question
- Next by Date: Re: Overriding derived values
- Previous by thread: Re: Fast SQL Question
- Next by thread: Should Cache' be on the MV Family Tree?
- Index(es):
Relevant Pages
|