similar to: sqlQuery of variable of type varchar - confusion with "."

Displaying 20 results from an estimated 4000 matches similar to: "sqlQuery of variable of type varchar - confusion with ".""

2006 Apr 04
2
xyplot: getting data into the panel function
In xyplot, I would like to get the "data into the panel function" in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c("l"), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...) vvv<-cow.s[which(!is.na(cow.s[subscripts,"mastreat"])),"time"] panel.abline(v=vvv,col="red",lwd=2) } ) If I want to use a
2003 Feb 10
3
non-SQL sqlQuery error
Dear all, I've encountered a curious problem. I am trying to run an SQL query using sqlQuery() function in RODBC. The query works fine when run in a stand-alone SQL browser (Microsoft Query Analyzer, in particular). However, when I use the exact same thing from sqlQuery() function, I get the following error: Error in "[.data.frame"(data, , ) : not all specified columns exist
2001 Nov 13
1
RODBC
I'm tryuing to get the RODBC package to work with a MS Sql database (Wonderware's InSQL). I'm able to connect to the database using the following: version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status Under development (unstable)
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 "
2005 Oct 19
3
sqlQuery and string selection
Dear alls, Could someone tell me how to select a subset of string observations (e.g. "females" in a sex column) with sqlQuery in the RODBC library? Indeed, I'm trying to select a subset of observations on my access database with: female<-sqlQuery(mychannel,"SELECT Micromammiferes.sex FROM Micromammiferes WHERE (((Micromammiferes.sex)="females"));") The sql
2010 Oct 11
1
importing numeric types via sqlQuery
Hi everyone, I am using the sqlQuery function (in RODBC library) to import data from a database into R. My table (called temp) in the database looks like this: category numabc 54469517.307692307692def 36428860.230769230769 I used the following R code to pull data into R:data <-sqlQuery(channel, "select category, num from temp;") However, the result is that "num" gets all its
2007 Sep 29
1
RODBC and Oracle
Hi WizaRds, I'm experiencing a problem connecting to an Oracle 10g database via RODBC (I'm getting this on Microsoft XP). The same SQL queries via PL/SQL Developer work just fine, but when I pump the query through sqlQuery in RODBC then I get a data frame back with 0 rows. I cut the query down alternating between PL/SQL and RODBC until I figured that it's some kind of row limit or
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 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 Sep 13
1
Paasing values to sqlQuery like SAS macro
Hello, We lost our SAS licence & I am busy transfering my old SAS programs to R environment. I am very new to R. In 1 program I was creating SAS macro vars & passing them into a SQL query to run against the server. There are 3 variables firm, begindt, enddt. # of values for each varies month to month. Is there anyway I could do the same thing in R & pass the afore mentioned values
2009 Apr 21
3
create objects in a loop and adding sqlQuery content to them
Hi there, I've got a database or rather spreadsheet with several columns and rows. For one column named sites I want to loop through all possible values and retrieve all data out of the database where site = x and write it into an object named 'sitex_data'. Somehow I'm really missing something as I'm not able to create these sitex_data objects with the database values,
2012 Aug 16
3
Reference a variable inside a string and another for object assingments
Hi R community I copied a bit of my R code that gets some data from a database. You won't be able to run the code, but I am a beginner so you will probably understand what going on. I would like to make a variable I can refer to inside the sqlQuery. Instead of writing the start date and time (ex SP.lokaldatotid >= '2005-01-01 00:00:00') inside the query I would like to define it
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],
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
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)
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
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
2002 Jun 04
1
data format of x in x <- sqlQuery()
All When I read data into an R variable x using RODBC command: x <- sqlQuery(channel,"select a, b from tabl",as="data frame") and view x, I get 3 columns the first one being the index of the rows in x. What options do I use in sqlQuery so as not have the index in x ? How do I get rid of the index otherwise. For some functions like princomp (and boxplot) for
2011 Jul 17
1
ODBC MySql DB: sqlQuery empty
Dear R Beginners, Experts and Users, I already asked this question on the R-sig-DB mailing list, but sadly didn't got a reply :-( . Keeping fingers crossed that I have more luck on the main R mailinglist :) . I'm trying to connect to a MySQl database via Gnu R using the RODBC interface. The conenction workes but I get an empty result string. Gnu R and the MySql DB are running on a 64 bit