Hello R people,
Please, I am trying to query a table that I created in PostgreSQL using the pgAdmin web interface. I created an empty table called "Actors", and attempted to write data into that table from R Studio.
dbWriteTable(con,"Actors",value = voice,overwrite = TRUE)
It appeared to be successful, because when I ran dbReadTable(conn = con,"Actors")
I did get my populated table just as it is in the csv file.
However, when I try to query that table, I get an error message. Here is my code:
aquery <- dbSendQuery(conn = con,"SELECT movie,actor,character FROM Actors
WHERE movie = Aladdin")
Here is the error message:
Error: Failed to prepare query: ERROR: relation "actors" does not exist
LINE 1: SELECT movie,actor,character FROM Actors
I don't understand why it is printing that message in my console, even though it seems I have done everything else right. I am new to PostgreSQL by the way.
Please, as always, I would greatly appreciate any helpful suggestion or advice. Thanks in advance of your help.
Here is the link to the dataset: https://docs.google.com/spreadsheets/d/1pcc6WB-bFKo5yEjgCKukPxkfmFSTaIC1fWr6OMPZc-E/edit?usp=sharing