Displaying 20 results from an estimated 200 matches similar to: "sqlUpdate RODBC"
2011 Aug 08
2
RODBC: sqlUpdate doesn't handle properly POSIXct field?
Hello all!
Can someone confirm whether there is a bug or not?
I was trying to use sqlUpdate in place of sqlSave as data set I import has duplications. However I get errors while using fast=FALSE argument to safely update/ignore duplicates:
Error while executing the query[RODBC] ERROR: Could not SQLExecDirect 'UPDATE "data" SET "logger"=1,
2008 Feb 25
2
Exporting a dataframe from R to Excel
I am trying to export a dateframe created in R:
> Duration_summary
V1 2.5 % 97.5 % V4 2.5 % 97.5 %
[1,] 1 0.46076018 1.128776 1.000000 0.5280828 0.9576338
[2,] 0 0.00000000 0.000000 1.000000 0.1741793 1.2352705
[3,] 1 0.46566719 1.313711 1.000000 0.7233312 1.4097987
[4,] 1 0.38866371 2.453226 0.976024 0.6377314 1.3493957
[5,] 1 0.08894066 1.036830
2010 Nov 25
1
RODBC
Hi,
I am running the RODBC examples form the help guide. I am trying to
UPDATE a table in an Access data base but I am having an error.
library(RODBC)
library(termstrc)
path = getwd()
setwd(getwd())
dbName = "data.mdb"
pathdbname = paste(path,"/",dbName,sep="")
accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2011 May 02
2
INSERT OR UPDATE
I'm trying to insert rows of a data.frame into a database table, or update where the key fields of a record already exist in the table. I've come up with a possible solution below, but would like to hear if anyone has a better solution.
# The problem demonstrated:
# Create a data.frame with test values
library(RODBC)
tbl <- data.frame(
key1 = rep(1:3, each = 2),
key2 =
2007 Nov 07
1
Dealing with schema in RODBC
Is there a way to get a table in a certain schema? The Oracle database I am
using has a table by the same name in two different schemas. This creates
problems in sqlUpdate because to sqlUpdate there are duplicate columns. The
following is part of the output of sqlColumns:
sqlColumns(eids, "TEST_ARTCL_INST")[,1:4]
TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME
1
2019 Apr 16
3
PROBLEMAS NOMBRES DE COLUMNAS CON ESPACIOS CONEXION R-SQL
Buenas tardes,
Estoy tratando de realizar un update en SQL desde R:
sqlUpdate(conexion1, data.frame(AUXILIAR), tablename = "AUXILIAR")
y me devuelve el siguiente error:
*Error in sqlUpdate(conexion1, data.frame(AUXILIAR), tablename =
"AUXILIAR", : *
* data frame column(s) Corteoptimo Cortediario not in database table*
El problema es que sí existen esas columnas en SQL pero
2011 May 04
1
tryCatch?
I would like to do inserts into a database table, but do updates in the fairly rare cases in which the inserts fail. I thought tryCatch might be the way to do it, but I honestly do not understand the help file for tryCatch at all.
I thought something like this might work:
for (i in seq(along = tbl$key)) {
tryCatch(sqlSave(pg, tbl[i, ], "tbl", append = TRUE, rownames = FALSE),
2017 Apr 17
4
Error en sql UpDate
Buenos días, al querer actualizar los datos de una tabla en SQL SERVER
sale el siguiente error:
Error in sqlUpdate(canal_conexion, Datos, tablename =
"Tabla_SQL_SERVER_Actualizar", :
[RODBC] Failed exec in Update22018 0 [Microsoft][ODBC SQL Server
Driver]Invalid character value for cast specification
Gracias desde ya por la ayuda.
--
[[alternative HTML version deleted]]
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,
2008 Aug 26
1
apache
How can I pass the following Oracle 10g variables to my apache?
ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/10g
ORACLE_SID=king
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH_32=$ORACLE_HOME/lib32
PATH=$PATH:$ORACLE_HOME/bin
NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256; export NLS_LANG
NLS_DATE_FORMAT=dd-mm-yyyy ; export NLS_DATE_FORMAT
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
2011 Dec 13
0
rodbc -- save result to a table
Hi All,
I am pretty new for RODBC. I want to save my table to a DB, so I used something like
sqlSave(db, a, 'Forecast_Result', rownames = FALSE);
But I got an error
Error in sqlSave(db, a, "Forecast_Result", rownames = FALSE) :
table 'Forecast_Result' already exists
Yes, that table has been created before. But I need to overwrite the content in that
2010 Aug 13
4
Rails and Oracle - can select date but cannot save
I''m seeing a behavior in Rails that I find very strange. Having worked
quite a bit with Oracle with other languages I would always dutifully do
ALTER SESSION SET NLS_DATE_FORMAT = <my_date_format> and ensure I use
that date format in my application.
With Rails I still have not figured out how to execute an ALTER SESSION
statement after connecting to the database (I''m using
2007 Feb 08
1
Announcement Sernet Samba 3.0.24 packages
With a little delay, here's the announcement for out 3.0.24 packages.
English version below.
Samba 3.0.24 ist soeben ver?ffentlicht worden. RPM-Pakete f?r diverse
SUSE und RedHat-Versionen sowie f?r Debian GNU/Linux k?nnen von
http://ftp.sernet.de/pub/samba/
heruntergeladen werden. Pakete f?r S390 folgen in K?rze.
Dieses Samba-Release behebt einige Fehler, darunter:
* einen
2006 May 19
4
Fast update of a lot of records in a database?
We have a PostgreSQL table with about 400000 records in it. Using
either RODBC or RdbiPgSQL, what is the fastest way to update one (or a
few) column(s) in a large collection of records? Currently we're
sending sql like
BEGIN
UPDATE table SET col1=value WHERE id=id
(repeated thousands of times for different ids)
COMMIT
and this takes hours to complete. Surely there must be a quicker
2012 Nov 14
0
Write to MS SQL Database
I want to update a column of a database table (in MS SQL) using sqlUpdate( )
or sqlSave( ) function in "RODBC" package. E.g. SQLchannel is the database
connection; SQLtable is the destination table in the database, including at
least two columns, ID and Value; Xdata is a data frame in R environment,
including two columns: ID and Value. What I wanna do is to update the Value
in SQLtable
2010 Feb 10
0
RODBC Update image file into a MS-SQL database table
Hi,
I am creating some graphs which I want to update into a database table.
The procedure I am following is:
1. create the graphs as a png/jpeg file.
2. Read that file as a binary vector
3. sqlUpdate
My code:
pngfile <- file(<filename>, "rb")
N <- 1e6
repeat{
pngfilecontents <- readBin(pngfile, what="raw", n=N)
if(length(pngfilecontents) ==
2004 Sep 15
0
RODBC 1.1-1
The first non-maintenance update of RODBC since January 2003 is now on
CRAN and will soon propagate to mirrors. From the ChangeLog:
* Select the decimal point from Sys.localeconv.
* Add an external reference and finalizer so open channels get
closed at the end of the session or when there is no R object
referring to them.
* There is no longer a
2004 Sep 15
0
RODBC 1.1-1
The first non-maintenance update of RODBC since January 2003 is now on
CRAN and will soon propagate to mirrors. From the ChangeLog:
* Select the decimal point from Sys.localeconv.
* Add an external reference and finalizer so open channels get
closed at the end of the session or when there is no R object
referring to them.
* There is no longer a
2005 Sep 05
1
RODBC and 64 bit
Hi all,
I was quite succesfully working with the RODB package on a 32 bit linux
box to connect to a MSSQL Server via the freeTSL driver. After changing
to a 64 bit environment I ran into some segmentation faults using
function sqlUpdate on large database operations (the actual seg faults
occured in the call to the C function ODBCUpdate).
I just briefly looked into the code and found some extensive
2008 May 05
2
RODBC and schemas
I have found that the "schema.table" syntax used in Postgresql (and
Oracle) does not work directly with RODBC.
This works
library(RODBC)
con<-odbcConnect("mydb")
d<-sqlQuery(con,"select * from meso.trees")
However this does not.
d<-sqlFetch(con,"meso.trees")
Error in odbcTableExists(channel, sqtable) :
?meso.trees?: table not found on channel