search for: sqlsave

Displaying 20 results from an estimated 129 matches for "sqlsave".

2006 Oct 18
2
sqlSave, fast=F option, bug?
Hi, Using the fast=F option, sqlSave saves without matching column names. It looks like a bug to me.......... Here's a simple (artificial) example. ----------------------------------------- Create a dataframe and save it to a database table "test" as follows: df <- data.frame(T=1, S=10) sqlSave(channel, df, "te...
2006 Dec 22
1
bug in sqlSave with fast=F option (PR#9429)
Full_Name: Paul MacManus Version: 2.3.0 OS: Windows XP Submission from: (NULL) (216.90.169.253) See also R-help thread for October 18, 2006 --------------------------- Create a dataframe and save it to a database table "test" as follows: df <- data.frame(T=1, S=10) sqlSave(channel, df, "test", rownames=F) The table now looks like T S 1 10 If I create another dataframe and save as follows df <- data.frame(S=20, T=2) sqlSave(channel, df, "test", rownames=F, append=T) Then table "test" now looks like T S 1 10 2 20 The importa...
2011 Nov 10
1
Help: sqlSave Error
I am using sqlSave to save my data into an existing table at MS SQL Server database. Previously my code ran smoothly but all of a sudden it stopped working. Here is my code: sqlSave(con, highVol, "dbo.futuresHighVol", append=TRUE, rownames=FALSE) Error: sqlSave(con, highVol, "jrgchis.dbo.futuresHighV...
2005 Mar 15
1
RODBC, sqlSave and sqlAppend
Hi all, I am currently trying to read, write and append data between R and MS access using the RODBC library functions. I have no problems reading in the data but when using sqlSave and sqlAppend it doesn't seem to work. I have made sure that all the column names are sensible and there are no gaps etc in the variables. My call looks like this: sqlSave(channel,treatlist,test=F) I've played with various options but what consistently happens is that R writes a new table...
2006 Mar 23
0
sqlSave
Dear Tobias, I finally succeeded in exporting my dataframes from R into Access with this script: library(RODBC) canal <- odbcConnectAccess("D:/Floristique.mdb") sqlSave(channel=canal, dat=flore, tablename="Floristique", rownames=F, safer=F, fast=F, varTypes=c(dates="Date")) odbcClose(canal) My problem in exporting my dataframe "flore" seems to be closely linked with the name of the column of dates in my dataframe, which was...
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...
2006 Feb 20
1
sqlSave
...ker, date, price. First, I created such a table in Microsoft Access with a few rows inputs. Using sqlQuery, I found that the date field was retrieved as POSIXct value. Then I made a data.frame with POSIXct as the data type for dates. However, I received the following errors when I was executing the sqlSave: > price = data.frame(ticker=rep("FMDEX",5)) > price$date=c(as.POSIXct("2003-1-1"), as.POSIXct("2003-1-2"), as.POSIXct("2003-1-3"), as.POSIXct("2003-1-4"), as.POSIXct("2003-1-5")) > price$price=1:5 > price ticker date...
2003 Jan 29
1
RODBC sqlSave Error
Hi, i get error after using a data.frame with subset for "sqlSave". What can i do ? It seems that lines like this in a data.frame structure are after subset deleted and cause the error ? - attr(*, "variable.labels")= Named chr "CUSID" "Welle" "Arbeitgeberfavorit1" "Aktuelle Bewerbungssituation" ... ..-...
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. -M...
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...
2006 Jul 25
1
[RODBC] ERROR: Could not SQLExecDirect
Hi, I've got a problem with RODBC and saving (sqlSave) of a dataframe in Access. R 2.0.1 is running on windows XP. When executing the examples in R help for the "USArrests" data set "sqlSAve" works fine, but running sqlSave() for a dataframe "Adat" > str(Adat) `data.frame': 1202 obs. of 18 variables: contai...
2009 May 09
1
sqlSave()
Hi all: I have created a MS Access table named 'PredictedValues' through the statement below: myDB <- odbcConnectAccess("C:/Documents and Settings/Owner/Desktop/Rpond Farming.mdb",uid="admin",pwd="") sqlSave(myDB,PredictedValues,rownames=FALSE) close(myDB) But if I run the code again with new values I get the message below: Error in sqlSave(myDB, PredictedValues, rownames = FALSE) : table ?PredictedValues? already exists and my new records don't get updated. I was under the impression that...
2010 May 20
0
RODBC: sqlSave leave primary key and other columns null
I have an existing table, and I am trying to use sqlSave to append additional rows to this database. I omit the primary key, which is a uniqueidentifier type (MS SQL), so that the database can populate that field. However, I get the following error: > sqlSave( ch, result, tablename=thetablename, append=TRUE, rownames=FALSE, colnames=FALSE ) E...
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 StartHTML:0000000107 EndHTML:0000001014 StartFragment:0000000127 EndFragment:0000000996 Error in sqlSave(myconn, p, tablename = "trial", rownames = FALSE) : [RODBC] Failed exec in Upda...
2003 Apr 02
1
RODBC sqlSave problem.
Dear list, Being new to both the postgres database, ODBC and the RODBC interface, I am somewhat confused by some of the problems I am experiencing trying to connect R to the database. Whai I am trying is basically the example part of the help file for the sqlSave function: > library(RODBC) > odbcConnect("theodor") -> channel > data(USArrests) > sqlSave(channel, USArrests, verbose = TRUE) Query: CREATE TABLE USArrests (rownames varchar(255) ,Murder float8 ,Assault int4 ,UrbanPop int4 ,Rape float8 ) Error in sqlSave(channel, USA...
2010 May 16
1
RODBC-Error-sqlSave
Dear R-community, After repeating the sqlSave-command 3 times on a dataframe (of size 13149 rows * 5 columns) to my MS-Access database I get the following error: *Error in sqlSave(channel, eksport_transp_acc_2, "transp_acc_scenarier", : unable to append to table ‘transp_acc_scenarier’* ** This means that the first 2 savings are com...
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 sqlSave(channel, temp6, tablename = "series_indices_test", append = TRUE, : unable t...
2009 Mar 01
1
Temporary tables with Microsoft SQL?
I can create a temp table with MySQL and R DBI[1], but I don't see how to do the same with Microsoft SQL 2005 and RODBC. R 2.8.1 creates the table, but then it can never see it. I'm looking to avoid replacing the convenience functions like sqlSave(). [1] https://stat.ethz.ch/pipermail/r-help/2009-March/190033.html > library(RODBC) > channel <- odbcDriverConnect("driver=SQL Server;server=foo;Initial Catalog=bar;Integrated Security=SSPI;") > x<-data.frame(1:10) > colnames(x) <-c("x") > sqlSave(cha...
2017 Jul 13
2
consulta por varTypes de sqlSave en RODBC
Hola Javier, si no estoy entendiendo mal, lo q deseo hacer no se trata de configurar los parametros SQL, sino solo de colocar un vector en el argumento VarTypes de la funcion sqlSave. El manual especifica esa opcion, pero no da ningun ejemplo de como usarla. *varTypes an optional named character vector giving the DBMSs datatypes to be used for* *some (or all) of the columns if a table is to be created.* En este pdf https://cran.r-project.org/web/packages/RODBC/vignettes/RODB...
2005 Feb 24
2
sqlSave reports invalid regular expression '[^[:alnum]_]+' (PR#7703)
Full_Name: David Whiting Version: 2.1.0 Under development (unstable) OS: linux Submission from: (NULL) (82.39.106.169) I have just upgraded from a previous version (2.0.0?) and found some of my code that used okay to run now gives an error. The function being called is sqlSave(). I am pretty sure (but not 100% certain) that the data frame I am trying to save has not changed. I am 100% sure that the ODBC connection information for MySQL has not changed and I have not updated MySQL. > sqlSave(lh, data, "survey") Error in gsub(pattern, replacement, x, ignore.c...