[thelist] Interesting SQL Mass update

rudy thelist at lists.evolt.org
Mon Oct 28 10:40:01 2002


> Are you talking Access or SQL Server or MySQL?

because he said asp, my guess is either ms access or ms sql/server

  update yourtable
    set yourcolumn = replace(yourcolumn,' target="_blank"','')
  where yourcolumn like '% target="_blank"%'

use asterisks instead of percents with the access jet engine

note the replace function uses single and double quotes -- be careful which
is which

it may seem that the WHERE clause is superfluous, and that the query will
also work without it, but then it would update every row

rudy