Thank you. I just skipped to append and it worked perfectly. I still haven't gotten join to work for a single row, but I don't need to so I'll come back to it at a later date.
On Tuesday, August 4, 2015 at 12:51:09 PM UTC-4, Jacob Quinn wrote: > > You probably want something like > > query(db,"insert into tbl values ($(join(vals,',')))") > > to do a single row. > > Also note that the `create` and `append` methods are supplied to handle > uploading "table"-like datastructures (i.e. anything that supports size(A) > and getindex(A, i, j)). > > -Jacob > > On Tue, Aug 4, 2015 at 10:44 AM, Brandon Booth <[email protected] > <javascript:>> wrote: > >> I'm trying to insert a series of large datasets into an SQLite database. >> My plan was to loop through the datasets and insert chunks of rows into the >> database. I'm trying to get a single row to work and then expand it to work >> with blocks of rows. >> >> So far, this works: >> v1 = vals[1,1] >> v2 = vals[1,2] >> v3 = vals[1,3] >> v4 = vals[1,4] >> query(db,"INSERT INTO tbl VALUES ('$v1','$v2','$v3','$v4')") >> >> I'd like to do something like this: >> query(db,"INSERT INTO tbl VALUES ('$vals[1,1:4]')") >> >> My attempt to pass an array gives me an error that the table has 4 >> columns but only 1 value was supplied. How do I properly pass the array? >> >> Thanks. >> >> Brandon >> >> >> >> >
