Skip to content
Prev 3409 / 15274 Next

RMySQL issue

Julien,

This question is more appropriate for R-help.  You'll usually get
faster/better replies from it, since it's more widely used.

The problem is with your use of the paste() command.  Use this instead:

upload_prices_single <- function(ticker, date_start,date_end)
{

Connect <- dbConnect(dbDriver("MySQL"),host="localhost",username="root",password="",dbname="QF_DUMP14122008",port="")

data <- dbGetQuery(Connect,paste("select quote_date, quote_adj_close
from qf_data_yahoo where quote_name = '",ticker,"' and quote_date >
'",date_start,"' and quote_date < '",date_end,"'",sep=""))

return(data)
}


HTH,
Josh
--
http://quantemplation.blogspot.com



On Sun, Dec 21, 2008 at 10:54 AM, julien cuisinier
<j_cuisinier at hotmail.com> wrote: