Thanks, Richard for replying.

Trying to run your script (Tcl) I get the error "Can't find sqlite3" even if I 
specifically point to /usr/bin/sqlite3  in the script (on Suse linux 10.1).

What can I do to get tcl to find sqlite3?

I have managed to export my database to openoffice.org calc (spreadsheet) and 
do a simple search and replace but I can't get that data back into sqlite3 
(newbie with pebkac!) from the csv file.

Further help would be appreciated.

Thanks again.

Iain.

[EMAIL PROTECTED] wrote: IAIN GALLAGHER  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   


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


Reply via email to