I have a 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
(List, --string to be searched
@email , --substring to be found
when I run this code, i get the following error
: Incorrect syntax near 'REPLACE'.
any guidance appreciated, thanks