Re: [R] SQL INSERT using RMySQL

2008-04-13 Thread Gregory Warnes
Hi All, I figured out my problem. There was a combination of lack of understanding on my part, and a bit of missing functionality. I made a small patch to the rmysqlWriteTable() function passes the field names to MySQL corresponding to the data columns passed in: diff -ru RMySQL.orig/R/M

Re: [R] SQL INSERT using RMySQL

2008-04-11 Thread Chris Stubben
Greg, If you have a MySQL table with an auto_increment field, you could just insert a NULL value into that column and the database will increment the key (it may not work in SQL STRICT mode, I'm not sure). I don't think there's any way to specify which columns you want to load data into using db

[R] SQL INSERT using RMySQL

2008-04-11 Thread Gregory. R. Warnes
Hi All, I've finally gotten around to database access using R. I'm happily extracting rows from a MySQL database using RMySQL, but am having problems appending rows to an existing table. What I *want* to do is to append rows to the table, allowing the database to automatically generate pri