Re: Fast SQL Question
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 '_at_' and after the '.'
>Is this the right command
>where EmailAddress like '%__at_hotmail._%'
Since my newsreaders automatically underlines everything with a _at_ 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 _at_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.
-- (Remove _NO_ and _SPAM_ to get my e-mail address)Received on Tue Nov 29 2005 - 23:36:46 CET