Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting email name length

Status
Not open for further replies.

txwylde

Programmer
Jan 25, 2001
60
US
I have an email field that I would like to count and put the results in a where statement. Longer emails would be suspicious.

How do I go about doing that?

Thanks!
Bill
 
You can use the following or modified version of the code below:

select email_id, character_length(email_id) as email_length,
case
when email_length >15 then 'SUSPICIOUS'
else 'NON-SUSPICIOUS'
end as email_type
from
<TableName>
where
email_type = 'NON-SUSPICIOUS'

Let me know if it worked for you.

Cheers,
Pramod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top