Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sql Code to Find Something

Re: Sql Code to Find Something

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 16 Mar 2003 10:32:51 GMT
Message-ID: <b51jse$232nf6$1@ID-82536.news.dfncis.de>

>
>
> Rene Nyffenegger wrote:

>> select email_addr from emx_table where instr(email_addr,'@') = 0;

>
> good solution !
> perhaps you could also exclude those adresses with more than one '@':

The following statement gives you all email_addr's that have either no @ or more than one @ in it:

select
  email_addr
from
  email_addr
where
  length(translate(email_addr,':@',':')) +1 <>   length( email_addr );

hth
Rene Nyffenegger

-- 
  Projektleitung und Entwicklung in Oracle/C++/C# Projekten
  http://www.adp-gmbh.ch/cv.html
Received on Sun Mar 16 2003 - 04:32:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US