similar to: Problems With RODBC, sqlQuery

Displaying 20 results from an estimated 3000 matches similar to: "Problems With RODBC, sqlQuery"

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
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
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: >
2012 Oct 26
1
Package RODBC sqlQueries
All - I'm new to SQL and the RODBC package. I've read the documentation associated with the RODBC package, but I'm still having problems with my SQL statements; I think my syntax, particularly with respect to my WHERE statement, is off but I can't find any documentation as to why. When I run a query from within the Access2007 database, it looks like this: SELECT
2007 Jul 17
4
[R-sig-DB] RODBC on Oracle DB
essai <- odbcConnect("ORESTE_prod", uid="osis_r", pwd="12miss15" ,case="oracle") > sqlTables(essai)$ORESTE ... 1315 <NA> ORESTE S_PROFESSIONS_OLD TABLE <NA> 1316 <NA> ORESTE S_PROVENANCES TABLE <NA> 1317 <NA> ORESTE
2009 Jul 15
1
Help with RODBC connection to multiple MS SQL Sever databases
I'm trying to pull data from multiple MS SQL Sever databse in R. I can access the databases one at a time, but the tables are to large to pull the entire tables then join then in R. So I need to do a SQL join that will join the tables from the each of the databases. How do I combine the connection so that I can implement it in my sql query below. I'm currently getting the following error:
2007 May 24
1
"[RODBC] ERROR: Could not SQLExecDirect"
Hi, everyone, I try to run as follows: Z>library("RODBC") Z>cnct<-odbcConnectExcel("Forbes2000.xls") Z>cnct RODB Connection 1 Details: case=nochange DBQ=C:\Program Files\R\R-2.5.0\Forbes2000.xls DefaultDir=C:\Program Files\R\R-2.5.0 Driver={Microsoft Excel Driver (*.xls)} DriverId=790 MaxBufferSize=2048 PageTimeout=5 Z>sqlQuery(cnct, "select
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 Nov 07
0
RODBC to MS SQL Server update error
Is this a bug: Trying to update when the where condition gives zero rows throws an error on MS SQL server > sqlQuery(pipe,"select * from ComDetailCurrent where RateTypeId is null;") [1] ProcessDate SourceSystemId AccountNumber Xref1 <0 rows> (or 0-length row.names) sqlQuery(pipe,"update ComDetailCurrent set RateTypeId=1 where RateTypeId is
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,
2009 Aug 13
1
using the RODBC for excel
Hi,   I am trying to import data directly from an excel spreadsheet using the RODBC package. I am getting the following error messages, wondering if anyone can help me with it?   > connection = odbcConnectExcel('D:\\R files\\TestData.xls') > tables = sqlTables(connection) > tables    TABLE_CAT TABLE_SCHEM  TABLE_NAME TABLE_TYPE REMARKS 1 D:\\R files\\TestData        <NA>
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
2007 Jan 24
1
RODBC
Hello, I am fairly new to R and its connectivity to MS-Access. I just installed RODBC and it seems to be working well except when I use the date to condition the query. For example the query below sqlQuery(channel, "select date from tblUScpi where (date > d2) order by date") returns the following error [1] "[RODBC] ERROR: Could not SQLExecDirect"
2008 Apr 04
1
RODBC / odbcConnectExcel Issue
Can someone throw light on the following problem I am having with RODBC? There's an Excel file I am trying to read from, it has one sheet named 'nameclass'. Thanks in anticipation. Vishal Belsare > library(RODBC) > con = odbcConnectExcel(file.choose()) > tbls <- sqlTables(con) > tbls TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 1
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],
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
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 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 "
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
2009 Sep 24
2
RODBC problem
Hi, I'm attempting to use the RODBC package on Windows Vista to import an excel spreadsheet. The spreadsheet has three worksheets the last of which is blank. Following an example in Phil Spector's book (p. 34), after creating a connection named con I did the following: > con RODBC Connection 3 Details: case=nochange DBQ=c:\temp\test.xls DefaultDir=c:\temp