I'm trying to do a select query on a psql DB. But my columnname is "Tagnaam", so case sensitive.
I'm trying this query:
cur.execute("SELECT Tagnaam FROM opc_taginstellingen")
I've read the solution would be to use double quotes on the column name, but that doesn't fix it.
What I also tried:
cur.execute("SELECT "Tagnaam" FROM opc_taginstellingen")
cur.execute("SELECT ""Tagnaam"" FROM opc_taginstellingen")
cur.execute("SELECT '"Tagnaam"' FROM opc_taginstellingen")
None of the above worked.
The error it gives:
cur.execute("SELECT Tagnaam FROM opc_taginstellingen")
psycopg2.ProgrammingError: column "tagnaam" does not exist
LINE 1: SELECT Tagnaam FROM opc_taginstellingen
^
How can I solve this problem?
Thanks in advance.
cur.execute("SELECT \"Tagnaam\" FROM opc_taginstellingen")orcur.execute('SELECT "Tagnaam" FROM opc_taginstellingen')