Displaying 20 results from an estimated 1000 matches similar to: "RODBC package -- sqlQuery(channel,.....,nullstring=0)stillgives NA's"
2005 Jan 12
1
RODBC package -- sqlQuery(channel,.....,nullstring=0) stillgives NA's
There is something strange in R behaviour (perhaps).
I have run the same select in Oracle SQL*Plus (version 10.1.0.2.0) and
the output comes out with NULLs (which is what it ougth to be).
But in R I still get the same result with NAs (no matter I use
na.strings or nullstring arguments)
An output example follows below:
Using na.string="0" and nullstring="0" (sorry by the
2005 Jan 11
1
RODBC package -- sqlQuery(channel,.....,nullstring=0) still gives NA's
R-help,
I'm using the RODBC package to retrieve data froma ODBC database which
contain NA's.
By using the argument nullstring = "0" in sqlQuery() I expect to
coerce them to numeric but still get NA's in my select.
I'm running on Windows XP
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386,
2006 Oct 17
2
RODBC and NULL values
Dear All,
Writing sooner than I thought I'd need to.
I'm using R 2.4 on Mac OS X, with RODBC, PostgreSQL 8.1 and Actual's
ODBC driver. I have all my data in Filemaker 8.5, but it is
automatically exported into PostgreSQL for analysis as Filemaker's ODBC
and JDBC access is awful, slow and has a tendency to crash.
I have disability data where for each patient there is a survival
2004 Jul 14
0
RODBC repeated rows problem
Hello everyone! I'm having the dreaded repeated rows problem in RODBC.
Specifically, when I have a NULL value in a column, odbcFetchRows reads the
value not as NULL or NA but as the most recent non-NULL value in the column.
If there is no such non-NULL column, odbcFetchRows reads the value as 0. Let
me give you an example (though you won't be able to run it with the
"product"
2009 Sep 15
1
quoting a table name due to a special character in sqlQuery (RODBC)
Dear List,
I have a problem with RODBC on a Paradox-DB, sqlQuery, and special
characters in table names. Unfortunately, some of the latter include the
underscore <_>. And I am not able to change them.
That's not a problem, when I quote the table name:
> sqlQuery(channel2, 'SELECT * FROM "anmeldung-alt"')
Btw, if I swap ' and " it does not work:
>
2009 Aug 20
1
problems with RODBC, sqlQuery
Hello,
Im trying to get a Oracle database to R, but I'm having problems with most
of SQL sintax. Suppose that Im trying to bring a table "TABLE" with columns
"COL1","COL2",.. from schema "SCHEMA". What am I doing wrong?
library(RODBC)
channel<-odbcConnect("xxx",uid="xxx",pwd="xxx")
sqlQuery(channel, "select * from
2014 Jul 02
1
parLapply on sqlQuery (from package RODBC)
R Version : 2.14.1 x64
Running on Windows 7
Connecting to a database on a remote Microsoft SQL Server 2012
The short form of my problem is the following.
I have an unordered vectors of names, say:
names<-c("A", "B", "A", "C","C")
each of which have an id in a table in my db. I need to convert the names to their corresponding ids.
I
2011 Aug 10
1
subqueries in sqlQuery function (package RODBC)
Hi R users.
sorry for missing example and if question is to general but I am wondering
if it is possible to execute subqueries in function sqlQuery (package RODBC)
with opened connection with Excel or SQL server 2000. I couldn't find any
example of this.
And if it is possible what should be a correct syntax for this query:
SELECT ct,COUNT(*) as n
FROM (SELECT COUNT(*) AS ct FROM children
2008 Aug 12
1
[RODBC] date attribute in sqlQuery
Hello R users,
I would like to use an integer and a date as attributes in sqlQuery,
and these arguments
are defined in my function.
Here is my function:
GetReturn<-function(code,date)
{
channel<-odbcConnect("db","user1","password")
ssql<-paste("select * from TABLE Where PF_CODE =",code,"and PF_DATE=",date)
2012 Mar 28
1
Is it possible to de-select with sqlQuery from the RODBC library?
Dear R-list,
I'm queering a M$ Access database with the sqlQuery function from the RODBC library. As I cannot make a working example with a database here is an illustrative example,
library(RODBC)
mdbConnect<-odbcConnectAccess("S:/data/ ... /databse.mdb")
data <- sqlQuery(mdbConnect, "select id, DOB, V1, V2, ..., V1009, V1011, V1013 from someTable")
I want
2007 Apr 02
1
RODBC, sqlQuery with NA:s
Hi R-users,
I'm trying to retrieve data from MS SQL database with RODBC's
sqlQuery-function:
temp <- sqlQuery(channel,"select *, (select text from table1 where
koodi='paa' and koodi2=paa) as tempor from table2")
str(temp)
…
$ var0 : num NA NA 1.6 NA NA 1.4 NA 1 NA NA ...
$ var1 : Factor w/ 45 levels "
2009 Oct 08
0
Problems With RODBC, sqlQuery
Hello,
Im trying to get a Oracle database to R, but I'm having problems with most
of SQL sintax. Suppose that Im trying to bring a table "TABLE" with columns
"COL1","COL2",.. from schema "SCHEMA". What am I doing wrong?
library(RODBC)
channel<-odbcConnect("xxx",uid="xxx",pwd="xxx")
sqlQuery(channel, "select *
2006 Jan 17
0
RODBC sqlQuery question
Why does this happen when I do a sqlQuery?
> sessionInfo()
Version 2.3.0 Under development (unstable) (2006-01-04 r36984)
powerpc-apple-darwin8.3.0
attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
[7] "base"
other attached packages:
RODBC
"1.1-5"
> b
2007 Jan 16
1
RODBC: sqlQuery is successful, but a similar sqlFetch returns error
Greetings guRus --
I have successfully queried a large (24,445 rows by 281 cols.) in-house
database using the following RODBC query (without the line breaks)
testout <- sqlQuery(channel, "select idSchedule,EXCL_Total from
dbo.vwC1198_2006_RawData_With_CMPL_EXCL")
This returns a dataframe of 24445 rows and two columns (as intended),
but the following command
testout
2009 Dec 19
2
Run time error when executing sqlQuery using the 64-bit version of R with 64-bit RODBC package in a Solaris 10 Sparc machine.
I have compiled and linked a 64 bit version of R (R 2.9.2) and the
corresponding unix ODBC 64 bit package
The red highlighted text below is the error I'm getting trying to when
invoking a sqlQuery
> library(RODBC)
> channel <- odbcConnect("OraLSH", <user>, <password>)
> sqlQuery(channel,"select sysdate from dual")
Error in .Call(C_RODBCFetchRows,
2006 Oct 13
1
RODBC sqlQuery insert slow
Large for loops are slow. Try to avoid them using apply, sapply, etc.
I've made the paste statements a lot shorter by using collapse. See
?paste for more info.
Append.SQL <- function(x, channel){
sql="INSERT INTO logger (time, v1, v2, v3, v4, v5, v6, v7, v8, v9,
v10) VALUES("d1=strptime(x[2],"%d/%m/%y %H:%M:%S %p '", d1, "' ,",
paste(x[3:12],
2007 Mar 13
2
RODBC Excel sqlQuery insert into
I have searched the archives for using insert into to update spreadsheets
using RODBC and have come up short. So, first off, is it possible?
I have put together a dummy xls table (c:\foo.xls)for exploring
possibilities of RODBC. Ultimately, I am interested in replacing much of
our previous use of vba macros with R ( I'd prefer elimination, but will
take what I can get ). In order to
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,
2004 Jun 16
1
Fwd: problem in long select from RODBC
Luis Ridao Cruz
Fiskiranns?knarstovan
N?at?n 1
P.O. Box 3051
FR-110 T?rshavn
Faroe Islands
Phone: +298 353900
Phone(direct): +298 353912
Mobile: +298 580800
Fax: +298 353901
E-mail: luisr at frs.fo
Web: www.frs.fo
-------------- next part --------------
An embedded message was scrubbed...
From: "Luis Rideau Cruz"