0

I want to use a numerical alias in sqlQuery in R. For example, when I run:

x <- 2017

test <- sqlQuery(tdConnection, paste("SELECT * FROM Table where year=x;"))

I get an error:

Column x not found

Alias works for text, but not for integers. Is there a way to do it for integers?

Scarabee
  • 5,437
  • 5
  • 29
  • 55
alexsmith2
  • 331
  • 4
  • 12

0 Answers0