IAIN GALLAGHER <[EMAIL PROTECTED]> wrote:
> I have a database of scientific references. In that database there is a table 
> (bibref) containing a field (Author). I would like to search for ampersand 
> (&) and replace it with a semicolon (;) in the Author field. 
> 
> How do I do this?
> 

In Tcl:

   package require sqlite3
   sqlite3 db your-database.db
   proc replacer {in} {
     return [string map {& ;} $in]
   }
   db function replacer replacer
   db eval {UPDATE bibref SET author=replacer(author)}

--
D. Richard Hipp   <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to