similar to: How to create temporary table in MySQL

Displaying 20 results from an estimated 2000 matches similar to: "How to create temporary table in MySQL"

2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all- I am stumped. The code in A. returns errors at lines 14 and 15 and fails to load series1 and series2. However, in B., if temp1 and temp2 are called again (which returns a "Table exists" error; see lines 14-17 in B.) series1 and series2 load correctly. Any ideas? Also-I am open to any suggestions to improve the code as I am a horrific programmer. Thanks A. 1 >
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
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:") >
2004 Nov 25
3
Searching for a string in RSQLite
I'd like to search for a particular string in an SQLite database using RSQLite, but I'm running into problems constructing the query properly, because of embedded quotes and parens in the string. Is there a function that escapes these for me, or some other fixup that would let me do the queries below? In the real situation I don't have control over what strings get searched for.
2010 Jan 25
1
RMySQL Append data.frame to table
I have a data.frame obj with 5 columns whose colnames match the fields in my "contact" table. The only other field my MySQL table has is an id field which is the PK and is set to auto increment. I'd like to load this data.frame using something like: dbWriteTable(con, "contact", dat, append=TRUE) However, I get this error: Error in mysqlExecStatement(conn, statement,
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",
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting in the example below a bug? > a <- (1:10) > b <- (LETTERS[1:10]) > df <- as.data.frame(cbind(a, b)) > > df a b 1 1 A 2 2 B 3 3 C 4 4 D 5 5 E 6 6 F 7 7 G 8 8 H 9 9 I 10 10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test")
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting in the example below a bug? > a <- (1:10) > b <- (LETTERS[1:10]) > df <- as.data.frame(cbind(a, b)) > > df a b 1 1 A 2 2 B 3 3 C 4 4 D 5 5 E 6 6 F 7 7 G 8 8 H 9 9 I 10 10 J > library(RSQLite) > drv <- dbDriver("SQLite") > con <- dbConnect(drv, dbname = "Test")
2012 Mar 30
0
RMySQL and german umlaute
Hi list, I have some trouble to setup RMySQL correctly to work with german umlaute: > library(RMySQL) Loading required package: DBI > pg <- dbDriver("MySQL") > con <- dbConnect(pg, username="dummy", host="localhost", password="", dbname="ga1prosp") > dbGetQuery(con, statement="SELECT * FROM K?rperma?e;") Error in
2007 Nov 02
0
RMySQL inserting data problem
Hello, I am trying to insert data in a data.frame into a database table using the RMySQL package m <- dbDriver("MySQL") con <- dbConnect(m, host = "blah", user = "blah", password = "blah", dbname = "blah") proid <- dbGetQuery(con, "select max(processed_data_id)+1 from processed_data") spot <-
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
2007 Mar 20
1
RMySQL load error
I'm having trouble getting RMySQL to load. I was able to build it and install it (RMySQL_0.5-11.tar.gz). I was also able to build and install mysql-5.0.37. I've read many postings about this but have not found a mention of my particular problem (some closely related). I get the "unable to load shared library, no such file" error, but all the files do exist, RMySQL.so and
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
2009 Jun 04
0
ROracle: cannot insert several columns
Hi all, I've been playing with ROracle (0.5-9) for a few days and I can't wrap my mind around this one. Here's a sample of my R (2.4.0) session. my.df<-data.frame(prd_id=c(123,456),vol_factor=c(.123,.456)) > my.df prd_id vol_factor 1 123 0.123 2 456 0.456 > library(ROracle) Loading required package: DBI >
2012 Mar 27
1
RSqlite UPDATE command problem
All: I am using RSqlite and want to be able to update individual values in a record, such as with this simple example: library(RSQLite) drv<-dbDriver("SQLite") con<-dbConnect(drv,"test.db") my.data<-data.frame(countries=c("US","UK","Canada","Australia","NewZealand"),vals=c(52,36,74,10,98))
2010 Mar 04
1
mysqlWriteTable . error in your SQL syntax?
Hi, Can somebody advice on weird mysqlWriteTable bug. > mysqlWriteTable(conn, 'comparison',design2, row.names = F, overwrite=T) Error in mysqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not run statement: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"condition"
2005 Mar 09
1
RMySQL installed but not availalable
I don't use MySQL but I have seen messages like this before. They often have replies which indicate that you need to follow the instructions more closely. I suggest you search the list for these previous posts as I'm sure there is help there, somewhere! Tom > -----Original Message----- > From: Adriano von Sydow [mailto:pdasilva at xtra.co.nz] > Sent: Thursday, 10 March 2005 5:13
2010 Apr 30
0
RMySQL and dates
I am trying to read and write database tables that have a date field in them. I am constructing a data.frame, then using dbWriteTable to create the table and dbReadTable to read it. >datatbl<-data.frame( dates, trialnum, fooddel, ethdel, trialtime, trialtype, deliveries, food, ethanol, fcumrec, dcumrec, rrf, rrd) >ifelse(startdate==filelist,
2007 Jul 16
1
S4 coerce
(I am not sure if this is a bug or a request for a more understandable warning, or possible something obvious I should be posting on r-help.) I am trying to coerce an new class object to be a DBIConnection and it does not work the way I think it should: R version 2.5.1 (2007-06-27) ... > require("RMySQL") # or require("RSQLite") Loading required package: RMySQL Loading
2008 Nov 28
0
Passing bigint (8-byte) values from Postgres to R using RPostgreSQL
Hi - I have a simple R script that inserts values into a Postgres table to generate a record that autogenerates a bigint unique ID (basically, a customized bigserial value). When I query the table to retrieve the bigint value, the value returned is not the same as the value created in the database (as evidenced by a direct query of the database table via pgAdmin). e.g. the value created should