Displaying 20 results from an estimated 4000 matches similar to: "AW: Passing dynamic sql statement to RODBC functions"
2002 Sep 04
1
Passing dynamic sql statement to RODBC functions
Hi,
Does anyone know how to pass dynamic sql statement to RODBC function
"odbcQuery()" or "sqlQuery()"?
eg.: under R session, I did:
>library(RODBC)
>channel<-odbcConnect(...)
>data1<-2.5
>data2<-5.0
I want to construct the INSERT sql statement using variables "data1" and
"data2" and pass this statement to odbcQuery() . Can I do this?
2008 Mar 03
0
reducing RODBC odbcQuery memory use?
1. Can I avoid having RODBC use so much memory (35 times the data size or more) making a data.frame & then .rda file via. sqlQuery/save?
2. If not, is there some more appropriate way from w/in R to pull large data sets (2-5GB) into .rda files from sql?
[R] reducing RODBC odbcQuery memory use?
From: WILLIE, JILL <JILWIL_at_SAFECO.com>
Date: Thu 25 Jan 2007 - 22:27:02 GMT
2007 Jan 26
0
FW: reducing RODBC odbcQuery memory use?
New to R, sorry if one or either of these is an inappropriate list for a
question like this below; please let me know if this is a general help
question.
Jill Willie
Open Seas
Safeco Insurance
jilwil at safeco.com
-----Original Message-----
From: WILLIE, JILL
Sent: Thursday, January 25, 2007 2:27 PM
To: r-help at stat.math.ethz.ch
Subject: reducing RODBC odbcQuery memory use?
Basic
2011 Dec 20
1
RODBC Error: 'getCharCE' must be called on a CHARSXP
I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code:
channel <-odbcConnect("some_dsn", uid="", pwd="")
txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"'
sqlQuery(channel, cat(txt,"\n"),errors=TRUE,)
close(channel)
However, I get the
2010 Jan 24
0
Setting thevalue of max in calls to sqlGetResults
I have compiled and linked a 64 bit version of R (R 2.9.2) and the
corresponding unix ODBC 64 bit package
When issuing a SqlQuery, I get the following error
> library(RODBC)
> channel <- odbcConnect("OraLSH", <user>, <password>)
> sqlQuery(channel,"select sysdate from dual")
Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max,
2010 Jan 24
0
Setting the value of max in calls to sqlGetResults
I have compiled and linked a 64 bit version of R (R 2.9.2) and the
corresponding unix ODBC 64 bit package
When issuing a SqlQuery, I get the following error
> library(RODBC)
> channel <- odbcConnect("OraLSH", <user>, <password>)
> sqlQuery(channel,"select sysdate from dual")
Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max,
2012 Aug 27
1
Querying sqlite through RODBC causes R to crash
Dear R-SIG-Debian,
while trying to query data from an SQLite database through RODBC on
Debian testing, R crashes with the following message:
library(RODBC)
con3 <- odbcConnect("test3")
# 'test3' being an ODBC datasource configured with SQLite3 driver,
# but the same happens with SQLite driver
sqlQuery(con3, "select * from test") # 'test' being any table
2008 Sep 24
0
Error results from MS Access via RODBC
I have an MS Access database with one table and one column holding rep(1:10)
I use:
library(RODBC)
channel <- odbcConnect("test")
sqlQuery(channel, paste("SELECT col FROM tblTest"), believeNRows=FALSE)
and get:
49
50
51
52
53
54
55
56
57
12337
What? The above should, of course, read:
1
2
3
4
5
6
7
8
9
10
I tried the 'odbcQuery' /
2008 Jul 23
2
Using RODBC to use SQL queries
Hello,
I am new to the RODBC package, but I have looked over the PDF as well as a few websites that go over the SQL language. I can connect to my database fine using
>channel<-odbcConnect("Oracle ODBC")
# then am prompted to enter my user id and password
After that I'd like to use the odbcQuery function and the SQL statement:
SELECT * FROM table_name WHERE SAMPLE_YEA LIKE
2003 Jul 09
2
RODBC and Oracle: error "table does not exist"
Dear r-helpers!
I have trouble reading data from an Oracle data base using
RODBC Version 1.0-3,
R Version 1.7.1,
Windows XP,
Oracle8 ODBC Driver Version 8.1.6.4.0:
> library(RODBC)
> channel <- odbcConnect(dsn="PAV32", case="oracle", believeNRows=FALSE)
> # ok, this was succesful
> x <- sqlTables(channel)
> x[37, ]
TABLE_CAT TABLE_SCHEM TABLE_NAME
2008 Jul 10
0
RODBC Close Memory Leak Question
Hi everyone,
In relation to the RODBC odbcClose bug which was fixed back in the
changelog below:
Version: 1.2-3 (2008-01-24, released)
* Plug a memory leak in inRODBCClose (closing a connection),
reported by Stephan Henne.
* Use translateChar() on character data sent in.
Background:
I am running some data from a SQL Server database, through unixODBC
(freetds) into R via the RODBC
2009 Jan 26
2
R crashes when using the RODBC Package
Hi,
I've written some code that fetches data from an Access Database (2003),
processes the data, then saves the modified data back into a table in the
Access database.
It works if I only pass through the code once, but if I put a loop around
the code so that I fetch data from a different source table, and then save
it again to a different destination table, the code crashes. It is
2010 Aug 13
0
some helpful tips on using RODBC
Hey everyone,
I don't have a question. Instead some helpful advice with things I've
learned from trying to connect 'R' to databases using RODBC.
ROBDC is a very handy tool that, once you have everything fixed up
nicely, is a great way to have scripts run fairly autonomously, safe in the
knowledge that data isn't accidentally messed up. But I was fairly ignorant
2006 Oct 05
2
Variables in RODBC environment
Hello Experts,
how can I use variables in the RODBC environment.
Example which does not work:
Thanks for your help.
Thorsten
pn <- '39R5238';
library(RODBC);
odbcobj <- odbcConnect("SQUIT21C",uid="muehge",pwd="xxx");
sql <- "select
u.unitid,
from test
where part in ('pn')
";
parameter <- sqlQuery(odbcobj,sql);
2014 Jun 30
1
Getting data from Table in RStudio
Hello,
I am new to R progaming and have just started using this program since last week. What i want to achieve is to use R to determine patterns in sales/ customer complaint etc. information located in a mysql database. I am not sure how to approach this or which technique i should use to do so. However, i had proceeded to add a dataset to RStudio using the following code:
library(RODBC)
2004 Apr 30
0
RODBC & MS SQL Server: repeated calls to sqlGetResults() problem
Dear list,
RODBC is mostly working very well on Windows XP talking to MS SQL Server.
However, when trying to retrieve a result set in repeated batches the first
batch returns results ok, but then subsequent calls return no data (see code
below). I tried setting believeNRows=FALSE both in odbcConnect() and in
sqlGetResults() but this doesn't appear to make any difference. Also
odbcFetchRows()
2002 Aug 02
1
R to Oracle via RODBC
Howdy,
I'm trying to use R to access Oracle 8i using the RODBC package On Linux
Red Hat 7.3.
Specs
R version 1.51
Driver: Easysoft ODBC - Oracle driver
Driver Manager: unixODBC
I get the following error when trying to executing RODBC commands. Can
anybody give me pointers as to what I'm missing or doing wrong
> library(RODBC)
> channel <- ("DSNName")
>
2009 May 25
3
Interpolating variables within (RODBC library) SQL statements for MySQL
Hi everyone,
I am desperately looking for a method to interpolate strings within an SQL
statement as follows:
I get a lot of rows out of a database (in my example POSITION_to_ZIPCODE
Database with holds records for German ZIP Code <--> Gauss-Krueger
Coordinate System ) and want this to be selected and computed individually
row by row as follows:
library(RODBC)
channel <-
2008 May 05
2
RODBC and schemas
I have found that the "schema.table" syntax used in Postgresql (and
Oracle) does not work directly with RODBC.
This works
library(RODBC)
con<-odbcConnect("mydb")
d<-sqlQuery(con,"select * from meso.trees")
However this does not.
d<-sqlFetch(con,"meso.trees")
Error in odbcTableExists(channel, sqtable) :
?meso.trees?: table not found on channel
2001 May 14
1
RODBC: closing databases
Dear all,
platform i386-pc-mingw32
arch x86
os Win32
system x86, Win32
status
major 1
minor 2.3
year 2001
month 04
day 26
language R
I wrote the following to import tables in different database formats
(Access, Visual FoxPro, etc.):
getTable <-