troubleshooting Question

Using REPLACE Function in SQL Server 2000

Avatar of blossompark
blossomparkFlag for Ireland asked on
Microsoft SQL Server 2005SQL
12 Comments3 Solutions761 ViewsLast Modified:
I have a table
table
in a sql 2000 database which contains email distribution lists.
I want to create a stored procedure that accepts an email address as an input and then remove all entries from the List column for that email address….

I can find  the individual emails  to be deleted by using Lowfatspread's code
Declare @email varchar (20)
set @email = Jsmith@acme.com’
select List from DISTRIB_LISTS where List LIKE '%'+@email+'%'

I now want to delete the specified entries from the
column rows and am looking at  the REPLACE Function
REPLACE
(List, --string to be searched
@email , --substring to be found
''--replacement string
)
when I run this code, i get  the following error
: Incorrect syntax near 'REPLACE'.
any guidance appreciated, thanks
 
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros