[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CHARINDEX Not working

Posted on 2006-05-04
2
Medium Priority
?
776 Views
Last Modified: 2006-11-18
Hi Experts,

This query isn't working for me.

SELECT     CHARINDEX(INDIVIDUAL_EMAIL, '@', 1) AS Expr1
FROM         TBL_INDIVIDUAL

Basically I want find all the test email addresses w/o "@" in the email address and delete them.  I figured if the CHARINDEX returned 0 I could delete, but I'm not getting address addresses that have the "@" at all!

Any help is appreciated.

Thanks,
Full Williams
0
Comment
Question by:FullWilliams
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 16607875
SELECT     *
FROM         TBL_INDIVIDUAL
WHERE CHARINDEX('@', INDIVIDUAL_EMAIL) = 0
0
 

Author Comment

by:FullWilliams
ID: 16607951
Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question