Hi Shamil,

yes, John's is more concise and better still, it works:
my use of [list insert ...] caused the last element to be delimited by
{} as it contains spaces.

Regards,

Arjen

On 2011-12-08 05:06, Shamil F. Daghestani wrote:
Thanks. It works even with my original list: set roads [list {Miller lane} 
{Pine street} {Wilson blvd}]

/sd

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of John Gillespie
Sent: Wednesday, December 07, 2011 5:22 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Tcl syntax help

Try
set roads {"Miller lane" "Pine street" "Wilson blvd"}
set SQL "insert into myTable VALUES( '[join $road "','"]' )"
db eval $SQL
# note the single quotes on each side of the join command
# and the <singlequote><comma><singlequote> argument to the join command.

JG
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Disclaimer:

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to which they are addressed. If 
you are not the intended recipient or have received this email in error please 
notify the system manager and destroy this email. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly 
forbidden. Please note that any views or opinions presented in this email are 
solely those of the author and do not necessarily represent those of the 
company. Finally, the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for any damage caused 
by any virus transmitted by this email.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users




DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to