search for: myquery

Displaying 13 results from an estimated 13 matches for "myquery".

2009 Sep 21
1
RODBC : using and passing queries that use " in some arguments
Dear R users, I am trying to connect R to data that is in a Access Database but I have problem with the construction of queries using special characters. I am using RODBC package. The following is working : > MyQuery<-paste("SELECT first( (DateHeure) ) , avg(NNO3_AT322_OUT_moy) AS Cond FROM Colonne_3 ") > Col3<-sqlQuery(con, query=MyQuery) > Col3 Expr1000 Cond 1 2009-06-23 10:15:02 579.9562 > > MyQuery<-paste("SELECT first( format (DateHeure)...
2006 Aug 18
1
Maximum length of R GUI input line?
Hello, I'm using R 2.3.1 on Windows. I'm generating some very long SQL statements. I do this by using paste() which will contain many strings and variables. I'm getting an error when the the total line length is longer than about 1013 characters. For example, it works with the line containing 1013 characters and not when it is 1059. I've looked into adjusting the
2007 Jun 05
1
multiple plot in odfWeave
..., host="mymachine.toulouse.inra.fr") @ Liste des projets: <<carte2, echo = FALSE, results= verbatim, fig = TRUE>>= lp <- dbSendQuery(con, "SELECT nom FROM projets") projets <- fetch(lp) nbr=dim(projets)[1] for (i in 1:nbr) { monprojet=(projets)[i,1] myquery=paste("SELECT s.longitude, s.latitude, o.orgashort FROM organisme o JOIN scientist s ON o.codeorga=s.codeorga JOIN partenaire p ON p.codescientist=s.codescientist JOIN projets ON projets.codeproj=p.codeproj WHERE projets.nom LIKE \"",monprojet,"\" ORDER BY s.longitude&q...
2005 Feb 24
2
mutable Query objects
There's a bit of an API glitch with Query objects at present. This code shows it off: Xapian::Database("/path/to/db"); Xapian::Enquire enquire(db); // make a simple query Xapian::Query myquery(Xapian::Query::OP_NEAR, phrase, phrase + 2); enquire.set_query(myquery); // Now change the query - this shouldn't affect the query enquire // will run, but it does. myquery.set_window(10); The essential issue here is that queries are mutable, so Enquire::set_query() needs to clone the Que...
2007 Mar 09
5
higlighting problem
...tiveRecord::Base acts_as_ferret :fields => { :description => { :store => :yes } } end I get back the correct results when I do Link.find_by_contents, however, I''d like to highlight them. If I do something like iterate through the list of results and call result.highlight("myquery", :field => :description), but this is returning nil for each result. How is this possible if these results are correctly returned because "myquery" is a token in their description? Am I incorrectly using the api? Thanks for the help, Ben -- Posted via http://www.ruby-forum.com...
2009 Nov 15
1
setting ValueRangeProcessor at runtime
...a simple test to see if I could add 5 VPs in a loop. Xapian::QueryParser qparser; Xapian::Query query; int vp = 0; while(vp < 5) { Xapian::StringValueRangeProcessor sproc(vp++); qparser.add_valuerangeprocessor(&sproc); } query = qparser.parse_query(myquery); That will compile, but when that code executes I get this error: pure virtual method called terminate called without an active exception Abort trap I *think* what's happening is that the sproc object goes out of scope at the end of the while() loop and is GC'd by the time the qparser...
2005 Jan 13
2
R, postgresql, windows & bsd
I usually work with R on a windows querying data through RODBC from a postgresql db on a freebsd machine on my offcie lan. Now I have the chance to use R also on a linux gentoo client box and to connect to the same db. I know that I can install the unixodbc stuff and stick to RODBC, BUT my question is: Is there any more 'linuxish' way of querying a postgresql server from a client?
2007 Mar 07
1
Fwd: Package-RODBC-MSACCESS
I have used RODBC to get the database i can view the tables in RGUI-2.4.1 how can i query the records in R> i tried with sqlQuery need some help JJ -- Lecturer J. Joshua Thomas KDU College Penang Campus Research Student, University Sains Malaysia -- Lecturer J. Joshua Thomas KDU College Penang Campus Research Student, University Sains Malaysia [[alternative HTML version deleted]]
2003 Sep 17
2
Very long console input lines
Hallo all, I got a problem executing R in batch-mode via a perl-script (under Win2000) : system ("Rterm.exe --slave --no-save --no-restore \<Rfile.r \>NUL"); The R execution is aborting with syntax error due to very-long lines. My solution is converting a <- c("very long string") to a <- paste("short string 1",\n "short string
2006 Nov 17
2
Forming SQL Query at run-time
Hi. I am trying to get data from mysql database using a couple of queries. I do one query to find out the indexes. Then i need to use these indexes in another query, but i keep getting errors. Here is something: numb <- dbSendQuery(con2, "select distinct(comparison) from table1") count <- fetch(numb, -1) my.matrix <- as.matrix(count) rs <- dbSendQuery(con2, "select
2010 Aug 13
0
some helpful tips on using RODBC
...provided.", sep="")) ### connect to the database & query tables. dbCon <- odbcConnect(db) tmp <- sqlColumns(dbCon, dbTable) varTypes <- as.character(tmp$TYPE_NAME) names(varTypes) <- as.character(tmp$COLUMN_NAME) if (!is.null(primeKey)) { myQuery <- paste("Select max(",primeKey,") from ",dbTable) primeKeys <- seq(1,dim(dataSet)[1]) + sqlQuery(dbCon, myQuery)[1,1] dataSet <- cbind(primeKeys,dataSet) ; names(dataSet)[1] <- primeKey } ## end if clause to create prime Key if (check.names)...
2006 Aug 01
0
checking form submission
...pp where some of the content is located in "static" rhtml files. How should I access form parameters in these files so that something like the following will work(simply checking whether a form has been submitted): <% require ''cgi'' cgi = CGI.new if cgi[''myquery_input_submit''] == ''1'' test = 1 else test = ''none'' end %> <%= test %> <%= ''my input'' + cgi[''myquery_input_submit''].to_s%> <form action="http://127.0.0.1/~josephmoore/testForm.rhtml" meth...
2006 May 17
3
QueryParser lowercase / uppercase and stemming
...although a stemmer is set ( see code snippet) # create a XapianDatabase object to search in $db = new XapianDatabase($path2db); # every Query needs an XapianEnquire object; i.e. specifying database to search in $enquire = new XapianEnquire($db); # call XapianQuery object $myQueryParser = new XapianQueryParser(); $myQueryParser->setDatabase($db); $stemmer = new XapianStemmer("german"); $myQueryParser->setStemmer($stemmer); $myQueryParser->setStemmingStrategy(STEM_ALL); #$querystring = removeUmlaute($querystring); #wildcard se...