[R] Specify Database location from R
macq at llnl.gov
Tue Aug 18 17:58:36 CEST 2009
I believe you will have to go into your ODBC configuration software
outside of R, find where "SOUTHAMPTON" is defined, and change it so
that it connects to that "different part of the server". Note that
"different part of the server" is not standard database terminology,
so it's kind of hard to guess exactly what needs to be done. You may
need assistance from your database managers.
At 10:33 AM +0100 8/18/09, Conrad Addo wrote:
>I'm trying to write a table to a specific location in my database from R.
>When I use the following code, it is going directly into the first part of
>the server which is named 'master' I want to put it onto a different part
>of the server called 'HRISK_1'. I think I have to change the tablename
>location or specify the location in the databse somehow. Could you please
>help me with the syntax of doing this?
>position = read.csv(file = "Position_FTSEhx.csv", header = TRUE)
>dataf = data.frame(position)
>tt = odbcConnect("SOUTHAMPTON", uid = "sa", pwd = "msscapital")
>sqlSave(channel = tt, dat = dataf, tablename = "rproject", safer = FALSE)
> [[alternative HTML version deleted]]
>R-help at r-project.org mailing list
>PLEASE do read the posting guide http://*www.*R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
More information about the R-help