I am having trouble understanding how to create a SQL command batch say in a list and pass it on to sqlite for execution in a transaction.
Basically what I do now is:
sqlite3 db1 $dbFile
db1 eval BEGIN
foreach Key [array names myArray] {
db1 eval {SQL statement involving $Key}
}
db1 eval COMMIT
I was thinking of a means to generate a list with SQL INSERTs and then passing it to db1 transaction or db1 eval, but this does not seem to work for me. Perhaps I am just making some stupin syntax mistakes. Anyone have a working example?
Thanks!