similar to: dbWriteTable in loop

Displaying 20 results from an estimated 40000 matches similar to: "dbWriteTable in loop"

2012 Jun 12
1
Not able to write to PostgreSQL database using "dbWriteTable"
Dear R User's Please help me to debug this issue. I am trying to write some data ( i= 6) to PostgreSQL database, but it not writing. Is there any issue in the way I use "dbWriteTable"? ++++++++++++++++++ Source Code ++++++++++++++++++++++++ library("DBI") library("RPostgreSQL") drv1 <- dbDriver("PostgreSQL") i=6 connAE1 <- dbConnect(drv1,host
2010 Oct 13
2
Rmysql - dbWritetable
Dear Rusers, I am trying to feed my database with data from a file. But since my file (2010101000.txt) there`s no headers I am facing problem because the result data.frame is not separated my columns. How could I set variables names for each columns in *dbWriteTable*? I have tried the command below but I don`t know how to fill the *field.type*option. dbWriteTable(con, "b20101010",
2010 Jul 16
1
Troubles with DBI's dbWriteTable in RMySQL
I am feeling rather dumb right now. I created what I thought was a data.frame as follows: aaa <- lapply(split(moreinfo,list(moreinfo$m_id),drop = TRUE), fun_m_id) m_id_default_res <- do.call(rbind, aaa) print("==========================================") m_id_default_res print("==========================================") ndf <- m_id_default_res[, c('mid',
2008 Aug 11
1
Unwanted carriage returns storing dataframes with dbWriteTable
If I save a dataframe with a character-typed last column to a relational database with dbWriteTable, the values in the last column of the resulting table in the database will have a '\r' (carriage return) appended. If I read back the dataframe with dbReadTable the last column in the resulting dataframe has also '\r' appended (see protocol below). Setting or unsetting sql-mode
2010 Oct 22
0
dbWriteTable
I'm having a strange problem with dbWriteTable ... I have the dbWriteTable inside a batchloop. dbWriteTable(con,"mutual_funds",tmp_MF_Data_F,append=T,row.names=F) # append rows to the data table The data gets updated for the first 3 loops (out of say 100) but then there is no error and data doesn't update. The command is getting executed without a problem but the
2011 Aug 31
2
dbWriteTable error message
I am at loss of what is going on here ... I am trying to write to a SQLite database: con <- dbConnect(dbDriver("SQLite"), dbname="pres-docs.rqda") I have a data frame that is 889 rows by 7 columns. The column number and types agree with the database table columns and column type. dbWriteTable(con, "fileAttr", DF.4, row.names=FALSE, overwrite=TRUE) Then I get
2017 Aug 29
0
DBI::dbWriteTable syntax error apparently from quotes
Double quotes are not legal SQL syntax. Use single quotes. -- Sent from my phone. Please excuse my brevity. On August 29, 2017 2:21:44 AM PDT, Eric Berger <ericjberger at gmail.com> wrote: >I have been successfully using RODBC for a long time (years) to connect >to >MS SQL Server from R. >This week I wanted to try using odbc but I am seeing some problems >which >may be
2012 Jan 16
1
dbWriteTable(con, access_log, overwrite = F).....
I am new to R. My goal is to make a crosstable from a Apache access.log, which I want to load into PostgreSQL database at first to learn more abour R and DBI and datatypes. When the I have got the access.log in the database I will try to make the crosstable! Trying to load the Apache access.log into PostgreSQL I get an error. dbWriteTable(con, access_log, overwrite = F); returns Error in
2017 Aug 29
2
DBI::dbWriteTable syntax error apparently from quotes
I have been successfully using RODBC for a long time (years) to connect to MS SQL Server from R. This week I wanted to try using odbc but I am seeing some problems which may be related to how I set up my driver and/or connection. The dbWriteTable manual page gives as an example command: dbWriteTable( pDB$con, "mtcars", mtcars[1:5,]) When I try this I get the following error Error:
2008 May 12
1
Insert a recorde into a table using SQL
Dear list, I want to insert a recorde into a SQLite table by dbGetQuery(), but there is a problem when the value contains quotation mark. > dd<-data.frame(txt=c("having both ' and \" in character.","OK")) > library(RSQLite) Loading required package: DBI > con<-dbConnect(dbDriver("SQLite"),":memory:") >
2011 Nov 08
1
dbWriteTable with field data type
Hello, When I do: dbWriteTable(con, "r.BOD", cbind(row_names = rownames(BOD), BOD)) ...can I specify the data types such as varchar(12), float, double precision, etc. for each of the fields/columns? If not, what is the best way to create a table with specified field data types (with the RpgSQL package/R)? Regards, Ben [[alternative HTML version deleted]]
2010 Mar 10
0
RMySQL_0.7-4 core dumped on dbWriteTable
Good Afternoon: Have an R script that uses RMySQL package. Everything works great within 32 bit ubuntu linux environment (/usr/sbin/mysqld: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped). > mysqlClientLibraryVersions() 5.1.41 5.1.37 50141 50137 Now testing on 64 bit ubuntu linux environment
2007 Jun 06
1
Question: RMySQL bulk load/update one column, dbWriteTable()?
Hi, I have a question reading using RMySQL trying to load one R vector into a table column. To be more specifically, the table is there populated. Now I add a new column and want to populate this. Can some colleagues on this list teach me how to do this? I know how to write one R object/table into MYSQL table using dbWriteTable. But in this situation, I just want to do one column. Thanks
2011 Dec 02
2
help in dbWriteTable
hi I need some help in dbWriteTable. I'm not able to insert the rows in the table if the column order are not same in the database and in the dataframe which i'm inserting. Also facing issue if the table is already created externally and inserting it thru dbWrite. is there some way that we can sepecify the rownames in the dbwrite..or any method which will solve my problem -- View
2005 Dec 14
0
SAS.xpt/STATA.dta, field descriptions, and dbWriteTable
Hello all, I have a large database (~100MB in 13 relational files) that made its way to me in two formats. The files were sent in both SAS xport and STATA, thanks, I am told, to stat-transfer. The two files, ostensibly, contain the same data, just in different formats. My goal: Move these files to MySQl without the help of SAS or STATA (which I do not have). The tools I am using are: 1.
2008 Nov 06
1
RMySql inserts \r when using dbWriteTable
I am using R 2.8 and the latest versions of RMySQL on a Windows XP 64 bit machine. I was wondering if someone could help me figure out how to use dbWriteTable without inserting \r into my table. Consider the following code snippet, which is run after I connect to my database. myDFOut = dbReadTable(conn, "myDF") print(myDFOut) myDFIn = data.frame(x=paste("x", 1:5, sep =
2004 May 25
0
RMySQL problem - SOLVED
Hi, The problem was the row.names that were sent to the database and created an primary key duplicate. Now it works fine. BTW congratulations for the package. It copied 15300 rows by 11 columns in less than 5 seconds, in my PIII 833 with 1 GB RAM. > system.time(dbWriteTable(con, "TBL_SIMDATA", TBL.SIMDATA, append = TRUE, row.names=F)) [1] 3.87 0.05 4.86 0.01 0.00 Just one
2019 Jun 13
2
Problema de INSERT en Windows SQL
Pd: Perdón por el duplicado de mensaje, se me olvido poner el asunto al anterior y me han surgido nuevas consultas. Buenos días, llevo unos dias peleando para realizar una consulta con INSERT en Windows SQL. He probado varios paquetes de R y con ninguno lo he conseguido. Ahora mismo estoy probando con DBI y odbc. Probé con dbSendStatementy al ejecutar la consulta:
2009 Aug 07
1
RMySQL - overwrite record, not table
Hi, useR- In RMySQL, how do I overwrite records? (equivalent to "replace" query). For example, suppose that dat2 is a newer data.frame than dat1. con <- dbConnect(MySQL()) res <- dbWriteTable(con, "DBname", dat1, row.names=F, append=T, replace=T) res <- dbWriteTable(con, "DBname", dat2, row.names=F, append=T, replace=T) This would not update/replace the
2011 Jan 04
2
RSQLite to input dataframe
Dear r helpers, At first, I apologize for raising a query which seems to be a stupid interpretation on my part. I am trying to learn SQLite. Following is an example given in the RSQLite.zip file (Page # 4) drv <- dbDriver("SQLite") tfile <- tempfile() con <- dbConnect(drv, dbname = tfile) data(USArrests) dbWriteTable(con, "arrests", USArrests) On the similar