Hi,
You should use the paste command:
for (i in 1:length(vessel[,1])) {
query<-paste("Select * From vessel Where common.utility(", vessel[i,1],", ",
,vesselyear[i,2], ")", sep="")
final<-sqlQuery(channel,paste(query))
}
Bart
Jason Gasper wrote:
>
> Dear R users,
>
> I am querying an Oracle
Dear R users,
I am querying an Oracle database using sqlQuery() from the RODBC
package. What I would like to do is embed my R Sql query in a for loop.
For example
suppose the data.frame "vessel" contains two columns: vessel[,1]= vessel
id and vessel[,2]=permit year
I am using "vessel" as
2 matches
Mail list logo