Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 want to have all emailid ....

Author  Topic 

asifbhura
Posting Yak Master

165 Posts

Posted - 2006-10-07 : 16:29:00
hi

i have emailid field in table.

I want all emailid which is having 3 or less than 3 character as maillid means before @ character.

please help me

waiting for reply

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2006-10-07 : 16:32:58
SELECT
emailid
FROM
Yourtable
WHERE
CHARINDEX('@', emailid) <= 3


Duane.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-09 : 03:57:51
1) If maximum three characters are allowed before @, doesn't that mean that @ is the fourth character?
2) What if there are no @ at all?

WHERE CHARINDEX('@', EmailID) BETWEEN 1 AND 4


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -