Search code examples
sqlrrodbc

Is the name of my table the issue? RODBC R


I am trying to pull data from a SQL server database using RODBC in R. All my connections are set up and work fine. The problems lies when I try to pull data from a table named Group. It seems that the name of the table is the problem since I am able to pull data from other tables. Perhaps the table name is a function/command. I was able to solve this problem in DBVizualizer by adding quotes in the table name however it doesn't work.

group1 <- sqlQuery(ch, paste("
  SELECT *
  from  asb.Group ")) 

Any Ideas? Thanks!


Solution

  • You can try:

    group1 <- sqlQuery(ch, "SELECT * from asb.[Group]")