From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Postgres 12.4 inner join with where statement = 'string' returning error
Date: Sun, 3 Jan 2021 20:45:08 -0600
Message-ID: <3e55a385-08b3-96a7-dc84-cc34e0adbf4a@gmail.com> (raw)
In-Reply-To: <BL0PR02MB537917C08B815DEF89BF99D7B6D20@BL0PR02MB5379.namprd02.prod.outlook.com>
References: <BL0PR02MB537917C08B815DEF89BF99D7B6D20@BL0PR02MB5379.namprd02.prod.outlook.com>
On 1/3/21 7:33 PM, VAE Ventures wrote:
> I am running a db on postgres12.4
>
> I have been trying to run a query that looks like this:
>
> SELECT * FROM table_1 INNER JOIN table_2 ON table_1.column =
> table_2.column WHERE table_1.column = ‘string’;
>
> I am being returned:
>
> ERROR: column 'string' does not exist
>
> The following queries work fine:
>
> SELECT * FROM table_1 INNER JOIN table_2 ON table_1.column =
> table_2.column WHERE table_1.column = int;
>
> SELECT * FROM table_1 WHERE column = ‘string’;
>
> I read several posts about this error, which seems very common and is
> usually solved by switching up quotation variations around the table name,
> column name, and the name of the string I am querying for. I have tried
> every variation of double and single quotes around each table name, column
> name, and name of string, and nothing worked.
>
> For some reason, it seems that querying for a string is what is throwing
> everything off. I am new to postgres, am I missing something? Appreciate
> any advice possible
Please show us an actual query with it's actual error message.
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Postgres 12.4 inner join with where statement = 'string' returning error
In-Reply-To: <3e55a385-08b3-96a7-dc84-cc34e0adbf4a@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox