Error with running SQL Query:

0 votes

Error with running below SQL Query: 

dbGetQuery(db,' select * from "offices" ')

dbGetQuery(db,'select * from "offices"')
Error: <SQL> 'select * from "offices"'
  nanodbc/nanodbc.cpp:1587: 42000: [MySQL][ODBC 5.3(a) Driver][mysqld-5.5.5-10.3.16-MariaDB]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"offices"' at line 1 
Sep 25 in Data Analytics by ch
• 3,290 points
40 views

1 answer to this question.

0 votes

Use below code.

ofc <- dbGetQuery(db,'select * from offices')
answered Oct 1 by anonymous
• 32,260 points

Related Questions In Data Analytics

0 votes
1 answer

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

Structured query language (SQL) is a programming ...READ MORE

answered Aug 24, 2018 in Data Analytics by Anmol
• 3,620 points
267 views
0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
329 views
0 votes
1 answer
0 votes
1 answer

Error with shortest.path function in R

you have a directed graph. The shortest.paths function will ...READ MORE

answered Nov 12, 2018 in Data Analytics by Maverick
• 10,040 points
75 views
0 votes
1 answer

How to connect to mysql database from rstudio?

Connect to the database as below. install.packages("odbc") db = ...READ MORE

answered Oct 7 in Data Analytics by anonymous
• 32,260 points
53 views
0 votes
1 answer

Read from database and store in R as dataframe

Your code would fetch you a MySQL ...READ MORE

answered Jul 29 in Data Analytics by anonymous
• 32,260 points
38 views
0 votes
1 answer

Show SQL equivalent code of dplyr code in R

show_query() translated dplyr code into sql equivalent ...READ MORE

answered Oct 14 in Data Analytics by Cherukuri
• 32,260 points
30 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,130 points
67 views
0 votes
1 answer

Error: stat_count() must not be used with a y aesthetic.

Hi Rayan, This error comes due to the ...READ MORE

answered Aug 19 in Data Analytics by anonymous
• 32,260 points
571 views
0 votes
2 answers

Error with installing ggplotly.

@bobby, uninstall Rtools and reinstall Rtools with ...READ MORE

answered Aug 30 in Data Analytics by anonymous
• 32,260 points
31 views