Displaying 20 results from an estimated 2000 matches similar to: "RODBC problem: sqlSave not working after an update"
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
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 )
Error in odbcUpdate(channel, query, mydata,
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 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
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
2011 Jul 27
2
RODBC sqlSave problem with bigint numbers
Hello,
After a (bad) first try some months ago, I'm trying again to use RODBC
package instead of DBI+RMySQL packages to populate MySQL database.
The main command is
sqlSave(channel, data_df, tablename, append=T, rownames=FALSE,
colnames=FALSE, fast=FALSE, varTypes=vartypes)
where data_df is the data.frame I want to save and vartypes is obtained
following the tip given here
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>
2009 Oct 16
2
RODBC sqlSave does not append the records to a DB2 table
I am running R version 2.9.2 on Windows XP OS with RODBC version Version:
1.3-0.
Has anyone out there in the R user community successfully appended records
to a DB2 table on a remote database using the sqlSave function in the RODBC
package? (or by any other means from R?)
I posed a similar question a few months ago and unfortunately, did not
receive a response. I was hoping recent upgrades to
2017 Jul 13
2
consulta por varTypes de sqlSave en RODBC
Buen dia Javier, muchas gracias por tu ayuda y el script compartido.
Me va a servir como ayuda para seguir aprendiendo sobre RODBC pero no
encuentro una solucion para este problema puntual de poder definir el tipo
y ancho de las variables, q segun creo se hace con el argumento varTypes.
Si alguien tien algun ejemplo donde haya usado la SqlSave y VarTypes, me
sera de gran ayuda.
Abrazo a todos
2009 Jun 09
0
RODBC sqlSave does not append the records
I am running R version 2.8.1 on Windows XP OS.
recs is a one-row, eighteen-column data.frame I want to insert into a DB2
table.
sqlSave(channel, recs, tablename = "testappend_slt", append = TRUE,
+ rownames = FALSE, colnames = FALSE,
+ verbose = TRUE, oldstyle = FALSE,
+ safer = TRUE, addPK = FALSE,
+ fast = FALSE, test = FALSE, nastring = NULL)
Query:
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
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
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
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 <-
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,
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,
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")