On Fri, 05 Oct 2007 15:20:41 +0000, drh wrote
> "Andy Goth" <[EMAIL PROTECTED]> wrote:
> > http://wiki.tcl.tk/2633
>
> I suggest you go head and write a short TCL procedure to 
> accomplish the same thing.

Like this?

proc sql_expand {varname} {
   upvar 1 $varname var
   set result [list]
   foreach elem $var {
      lappend result '[string map {' ''} $elem]'
   }
   return [join $result ,]
}

$ set x {1 2 3}
$ db eval "insert into xyzdata values ([sql_expand x])"
(expands to)
$ db eval "insert into xyzdata values ('1','2','3')"

Is there any problem with the spurious quotes around the values?  Will that
interfere with integer primary key or anything like that?

> There are deep technical reasons why this is very difficult
> and unlikely to ever happen.

I will spend some time familiarizing myself with the relevant bits of the
SQLite sources to see why this is the case. :^)

-- 
Andy Goth
<[EMAIL PROTECTED]>


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

Reply via email to