Please, I have set up a PostgreSQL on Heroku, which I am trying to call from R Studio. I have used this line of code
dbWriteTable(conn = conh,"apple",value = aapl,overwrite = TRUE) to write a table to the database called "apple" , which has columns
Close. When I call the table with the following basic sql query
dbGetQuery(conn = conh, "SELECT * FROM apple") I get the entire table returned as an R object. But when I write something like
dbGetQuery(conh,"SELECT Open, High,Low FROM apple WHERE Open > 70"), I get the following error message and hint, which does not solve the problem, in my console:
Error: Failed to prepare query: ERROR: column "open" does not exist LINE 1: SELECT Open,High,Low FROM apple WHERE Open > 70 ^ HINT: Perhaps you meant to reference the column "apple.Open".
Please if anybody else has had the same experience, kindly advise me please, thanks.