similar to: RODBC: sqlSave leave primary key and other columns null

Displaying 20 results from an estimated 1000 matches similar to: "RODBC: sqlSave leave primary key and other columns null"

2011 Dec 04
1
RODBC sqlSave / append problem (windows XP, R 2.13.2)
Dear All, Using RODBC I have read in a (429 x 11) dataframe from Access, and would like to append two columns of transformed data (429 x 2) to the original table (thereby making it a 429 x 13 table). I would ideally like this to be the same name etc as the original table in Access. I have used the following command: R>
2010 Feb 24
1
problem with looping on sqlSave()
Dear R users, I have a follow-up question on sqlSave(). Since most of the output from the tests I use are lists, I would like to loop to export each element of the list and append it to the sheet. Here is what I do: > library(RODBC) > test <- structure(list(m = structure(c(0.090909090909091, 0.181818181818182, 0.272727272727273, 0.363636363636364, 0.454545454545455,
2000 Mar 08
0
RODBC: follow up
Hi Michael, Here is the result of my first testing: (0) Dr. Watson Sorry, I should have given a more precise description: by default in R exists a function with the name 'table', if you use this name as in odbcPrimaryKeys(0, table) a Dr. Watson occurs, because table does not give a table name. However, it is always a good idea to prevent Dr. Watsons, even if it is triggered by a
2012 May 29
1
RODBC, Excel, and data truncation when writing
Hi, I am hoping to use the RODBC package to write a dataframe to an Excel .xlsx file. The dataframe contains at least one field with character elements that exceed 255 bytes, which appears to be the cell width limit in Excel. Below is example code and the warning message received: library(RODBC) d <-
2008 May 07
0
RODBC sqlSave with multiple schema in DB2
Hi, I am trying to use sqlSave to write a dataframe to an existing table in a DB2 database. The database contains two schemas. My experience is the following: (1) in the case that tablename is left empty in sqlSave, R writes to the instance level schema (2) in the case that a tablename is specified and that table name exists only once in the database, R will write to that table irrespective
2007 Feb 02
0
New RODBC: a problem with sqlSave
Till yesterday I was more than satisfied by RODBC, specifically by sqlSave which I had been happily using in a daily crontab R batch job regularly updating a postgresql db for as long as one year. In this R- batch I was able to save records into indexed tables *** even though *** they already existed. in this case sqlSave simply neglected those rows of the input table that were offending the
2012 Feb 06
0
sqsSave() test using Test.R script returning error suggesting no values upon "insert"
Hi. I attempted to use RODBC and decided to execute all the tests provided in "Test.r" under the unpacked package RODBC folder. Beginning with the following: library(RODBC) library(MASS) USArrests[1,2] <- NA hills <- hills[1:15,] row.names(hills)[12] <- "Dollar ('$')" set.seed(1) # MySQL ## testdb3 is ODBC/Connector 3.51.x, testdb5 is 5.1.x channel <-
2009 Jul 08
0
RODBC and sqlSave issue
Hello, I contact you after having unsuccessfully asked my question to R mailing list. I use the package RODBC to connect to a MS-SQL server. I am able to getQuery from the database. I am now studying the sqlSave some data into the database. Unfortunetly, I meet some issues relating to the format of the data that arrives into the database. I have three columns. The first one should be in the
2018 Jan 24
1
Help with SQLsave
Hi all, I'm using RODBC library to connect to a database. I'm trying to read a table from a database and after manipulating it would like to write to the same database but with a different table P<-data.frame(sqlQuery(myconn,'select? *? from Demographics')) sqlSave(myconn,p,tablename="trial",rownames=FALSE) I'm gettng this error Version:1.0
2007 Oct 22
0
RODBC problem: sqlSave not working after an update
Good day, all. I just upgraded to R 2.6.0. I re-installed my most-used packages including RODBC to be sure I'm up-to-date. I have been working with a large insurance claims dataset stored in a MS-Access database on a Windows machine. I have been regularly exporting tables from R into it using sqlSave. It's worked like a charm until today, when this happened: >
2007 Mar 07
0
sqlSave help!
Hi Everyone, I'm so confused. I've been trying to save data to a table but I keep getting an error that says the table does not exist and at other times saying that it does. So here are some statements: > sqlQuery(channel, "select top 1 * from > TestDB.[SILICON\\holouis1].clep_tier_shift") State NB Change_Number 1 IL 2005-02-08 7 It exists and I
2009 May 29
1
RODBC sqlSave with DB2
I am running R version 2.8.1 on Windows XP OS. This works fine. (Data.frame dta is created with records from the DB2 table.): sql <- "select * from storage.testappend_slt order by uut" dta <- sqlQuery(channel,sql) But when I try to append records (from data.frame newdta) to the same DB2 table. I get an error: sqlSave(channel, newdta, tablename = storage.testappend_slt, append
2001 Aug 31
1
RODBC SQLSave
I am having the following problem with RODBC I connect to an oracle 8i (8.1.7) database using RODBC as follows; dbConn <- odbcConnect("mydatabase","myuserid","mypassword",case="oracle") Then I extract some data, actually a whole table; orgdata <- sqlQuery(dbConn, "select * from organism", na.strings = "NA") Then I try to save it
2013 Jan 31
0
RODBC and datetimes
I've got a data.frame I'm trying to insert into a database table in an ms sql server instance using RODBC. When I save a table using nothing but character and numeric columns things work fine. However, when I attempt to add another column of type POSIXct to the data.frame and redefine the table to incorporate the new column (in the DB),attempting to push the table to the DB using
2010 Feb 24
1
problem with sqlSave()
Dear R users, I've already asked this question yesterday, but, though I had answer for the other ones (and they helped a lot, thanks), for some reason didn't get an answer for this one (I would also appreciate to know why, so that I can improve the quality and clarity of my future questions). Here it is again: I'm trying to use RODBC to export dataframes to xls files. When I run
2003 Apr 04
2
sqlSave() Question
All, I am new in R. I found sqlSave() doesn't work for our Oracle9i. The following was the message: > sqlSave(channel, USArrests, rownames="state") Error in sqlColumns(channel, tablename) : USArrests : table not found on channel Check case parameter in odbcConnect > sqlQuery() works OK. Please help. Thanks. -MY
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean") sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE) This is giving me an error: Error in
2009 Nov 19
1
Problem with sqlSave
Hello, the sqlSave function is used in order to write a dataframe on excel. This function creates worksheets using the attribute tablename and writes the data.frame in it. What I want to do is to create this data.frame but being able in case this worksheet already exists to delete the former datas and write the new ones in it. I used the safer and append attributes. When you set safer to false,
2013 Sep 19
1
Vignette problem and CRAN policies
Hello, All: The vignette with the sos package used "upquote.sty", required for R Journal when it was published in 2009. Current CRAN policy disallows "upquote.sty", and I've so far not found a way to pass "R CMD check" with sos without upquote.sty. I changed sos.Rnw per an email exchange with Prof. Ripley without solving the problem; see below. The
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") first <- sqlQuery(chan, "select * from example")