I am working with the R programming language. Suppose I run the following code:
library(RODBC)
library(sqldf)
con = odbcConnect("some name", uid = "some id", pwd = "abc")
sample_query = sqlQuery(con, "select distinct * from table_a a
inner join table_b b
on (a.date_1 between b.date_2 and b.date_3 and a.id1 = b.id1) or a.id2 = b.id2)
view(sample_query)
My Question: Is there a way to directly place "sample_query" on to the server specified in the "con" statement? Currently, "sample_query" is being created within the global environment in R studio - but is there a way to place "sample_query" on the server (i.e. the same place where "table_a" and "table_b" are located)?
Thanks!