similar to: Insert variable in RMySQL-Statement

Displaying 20 results from an estimated 3000 matches similar to: "Insert variable in RMySQL-Statement"

2005 May 02
2
RMySQL query: why result takes so much memory in R ?
Hi I just started with RMySQL. I have a database with roughly 12 millions rows/records and 8 columns/fields. From all 12 millions of records I want to import 3 fields only. The fields are specified as:id int(11), group char(15), measurement float(4,2). Why does this take > 1G RAM? I run R on suse linux, with 1G RAM and with the code below it even fills the whole 1G of swap. I just
2011 Oct 19
4
Using SQL "IN" with RJDBC or RMySQL
Hello, The code below works fine up until I try to use the "IN" statement in the last line. The proper SQL format is: SELECT * FROM this_table WHERE this_column IN (1,2,3,4,5) But, I think I may be getting something like: SELECT * FROM this_table WHERE this_column IN c(1,2,3,4,5) Which makes no sense in SQL. I think it may be just a matter of string massaging, but I'm not
2010 Nov 07
1
using variable in rmysql query
Dear All, I am using this query it returns id : id <- dbGetQuery(con1,"SELECT id FROM tenants WHERE name LIKE '%consim%'") But In my case the string "consim" is there in another variable(it is coming from configuration file); > str <- "consim" I am trying to replace the string some this like, but it not working: > id <-
2006 Mar 06
3
Disconnect all MySQL connections
Hi I've got the error "cannot allocate a new connection -- maximum of 16 connections already opened" after I tried to create a new connection to a database. However, the reason ist, that i did not disconnect previous connections.... I don't know the name of this connections. How can I disconnect this "unknown" connections and drivers? if I delete all objects, the
2011 Mar 23
1
using R variables in RMySQL query
I have the following function myGetstockdataMySQL <- function(startdate, enddate, ticker) { con <- dbConnect(MySQL(), user="blahblah", password="blahblah", dbname="blahblah", host="localhost") rs <- dbGetQuery(con, "SELECT price.close FROM price INNER JOIN stocks ON stocks.stock_id=price.stock_ID WHERE (price.date_holding BETWEEN
2008 Apr 11
1
SQL INSERT using RMySQL
Hi All, I've finally gotten around to database access using R. I'm happily extracting rows from a MySQL database using RMySQL, but am having problems appending rows to an existing table. What I *want* to do is to append rows to the table, allowing the database to automatically generate primary key values. I've only managed to add rows by using dbWriteTable( con,
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
2007 Jun 04
2
RMySQL question, sql with R vector or list
Hi, I am trying to write a RMySQL sql script inside R such that part of the SQL would be R list or vector. For example, I want to select * from Atable where ID would equal to a members of R list or vector of "1, 2, 3". Here the ID list was generated inside R and then try to feed to mysql to call to get additional data sets. Can someone on the list help? Thanks. -- Waverley @ Palo
2007 Sep 27
1
RMySQL NA/NULL value storage error
Greetings all, I am running R 2.5.1, RMySQL 0.6 , and DBI 0.2-3 on Windows XP Like others, I am having trouble with NA/Null value conversions between R and a MySQL database via DBI, but I could not find my exact problem in the archives. Most of the time NA values in R get transferred correctly to the database and back again, unless (apparently) if they are in the last column of the table being
2009 Jan 19
1
[Win] Hangup RGui with RMySQL (PR#13453)
Full_Name: Apfel Schmied Version: 2.8.1 (2008-12-22) OS: WinXP SP2 Submission from: (NULL) (134.106.122.139) RMySQL Version: 0.7-2 DBI Version: 0.2-4 MySQL Version: 5.1.30 (Enviroment Variable MYSQL_HOME is set) Updated R from 2.60 to 2.8.1. Now Gui.exe hangs up (100% CPU Useage) when requesting data from a mysql database. Example Code:
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",
2008 Oct 14
2
Getting frustrated with RMySQL
Getting the basic stuff to work is trivially simple. I can connect, and, for example, get everything in any given table. What I have yet to find is how to deal with parameterized queries or how to do a simple insert (but not of a value known at the time the script is written - I ultimately want to put my script into a scheduled task, so the analysis can be repeated on updated data either daily
2010 Jun 10
1
Can RMySQL be used for a paramterized query?
I have not found anything about this except the following from the DBI documentation : Bind variables: the interface is heavily biased towards queries, as opposed > to general > purpose database development. In particular we made no attempt to define > “bind > variables”; this is a mechanism by which the contents of R/S objects are > implicitly > moved to the database during SQL
2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million times... the loop opens text files in a directory and inserts line by line into a database... *** caught segfault *** address 0xc0000010, cause 'memory not mapped' Traceback: 1: .getGeneric(f, where, package) 2: getGeneric("coerce", where = where) 3: as(obj, "integer") 4:
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
2006 Nov 07
3
have I an actual matrix?
Hi all! I do hope question from newcomers are wellcome here! Thanks in advance. Trying to catch up and to acquired the needed background to easily read R documents it is being a bit hard to me to get into the required concepts to deal with data. I am trying to get data from a MySQL database and plotting it with barplot. Here the code... library(RMySQL) con <- dbConnect(dbDriver
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 Jun 23
1
RJDBC vs RMySQL vs ???
I am running a simple SQL SELECT statement that involvs 50k + data points using R and the RJDBC interface. I am facing very slow response times in both the RGUI and the R console. When running this SQL statement directly in a SQL client I have processing times that are a lot lot faster (which means that the SQL statement itself is not the problem). Did any of you compare RJDBC vs RMySQL or is
2009 Dec 24
1
How to dbReadTable() only a limited number of rows? (RMySQL)
I only want to load a limited number of rows by dbReadTable(). I don't see an option in the help. Is there an option to do so?
2006 Mar 28
3
R, RMysql, and MySQL 5 Decimal Type Support
Hi, Whenever I have a MySQL query that returns a Decimal result to R I get the following warning in R: Warning message: RS-DBI driver warning: (unrecognized MySQL field type 246 in column 1) I get this for a simple query like "SELECT 2, 2.5" !! I am using: R ver 2.1.1 RMySQL ver. 0.5-7 DBI ver. 0.1-10 MySQL Ver 14.12 Distrib 5.0.18. Please Help! Jason