Good afternoon.
Stuck in a simple query
def get_referal(self, chat_id): with self.conn: self.cursor.execute('SELECT chat_id FROM profile WHERE ref = %s AND NOT comp_name IN ('No name');', (chat_id,)) return self.cursor.fetchall()
Gives the following error
psycopg2.ProgrammingError: column "No name" does not exist
LINE 1: ...rofile WHERE ref = 442965 AND comp_name NOT IN ("No name")...
Options
comp_name != "No name"and
NOT comp_name IN ("No name")'the same give the same error. Supposedly the field "No name" does not exist. Well, it's the value of a field, not the field itself...
Help me, tell me, what's blunt?