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, 2019 in Data Analytics by ch
• 3,450 points
1,068 views

1 answer to this question.

0 votes

Use below code.

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

Related Questions In Data Analytics

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,840 points
3,333 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,840 points
1,729 views
+1 vote
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
4,836 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, 2019 in Data Analytics by anonymous
• 33,030 points
3,659 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 30, 2019 in Data Analytics by anonymous
• 33,030 points
1,115 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, 2019 in Data Analytics by Cherukuri
• 33,030 points
2,178 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,250 points
1,273 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, 2019 in Data Analytics by anonymous
• 33,030 points
9,932 views
0 votes
2 answers

Error with installing ggplotly.

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

answered Aug 30, 2019 in Data Analytics by anonymous
• 33,030 points
1,097 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP