[R] Using a variable for mysql/database Query

Dieter Menne dieter.menne at menne-biomed.de
Tue Jun 23 19:29:30 CEST 2009


jorgusch <hackl.schorsch <at> web.de> writes:

> Collecting data I need to check in a mysql server. As the data are dependent
> on each other I have to filter first.
> 
> However, I have now the problem that I find a value and would like to insert
> it into a data query for the "real select" command. Obviously, typing 'x'
> does not help as the database does not now this entry. Anyway to make it
> work?

The usual way to handle these case is to construct an SQL command using
the retrieved value by paste. 

More generally, your requirements smell like being a good use of an SQL
join.

Dieter




More information about the R-help mailing list