Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwFsD-0005sm-T0 for pgsql-admin@arkaria.postgresql.org; Mon, 04 Jan 2021 02:45:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kwFsA-0007FR-Hr for pgsql-admin@arkaria.postgresql.org; Mon, 04 Jan 2021 02:45:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwFsA-0007FK-7R for pgsql-admin@lists.postgresql.org; Mon, 04 Jan 2021 02:45:30 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kwFrs-0007Qc-6p for pgsql-admin@lists.postgresql.org; Mon, 04 Jan 2021 02:45:29 +0000 Received: by mail-oi1-x232.google.com with SMTP id d203so30572475oia.0 for ; Sun, 03 Jan 2021 18:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=w2H7HQCyj9qiGJ2YmC/SlbSKq8SToqNBgpPSVQ81rP4=; b=fR7MqSqpsMMbmDs2HOIY4gykqRsy+8WG3Bocx/J7QaEEXgMbgrS76YcXHruPQKtLYJ RPEwvsjk8+NgLmvxrBM1iIZrgb9sTMDnBq/KxTEc2lVgcqZiTCS6mK1pCLAA3smCoGio sbpa+qLh326imqbeIvFQ+Au4JWEF684GcEfCU1RcU+tLU4bXr94O2j28HW0uoKd+hGYM Ffl2ej7wjTADdX8W1VsnkJ+jDhAts9YpRDmtm2S/W8NDna/ki+hHWpJiyFALZXhlfELY 6QtfChpVsqZQyTu0dw+Vxxh2F86sQXrNULNj+aG4mF72rSRGCjMKCsEMj9fzRhToIcpA sLcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=w2H7HQCyj9qiGJ2YmC/SlbSKq8SToqNBgpPSVQ81rP4=; b=aMIU44RbcBvzqpPzuTIAAB3EDJleFFzpKGGeWVIRLQeBvpAtyqWvxlWhauVmz91uSQ 91Ue5Cc+n6mJlKT3XHF98EEEjw7imPlfx+Ik855P+jXOASpbplr1ckQdXTTVvwxU2iMX 6EO4/A64RIicXefaUSoN7cwdxWq0DM4WKYQa3obmWGR3sLaRYDrrc3PDeAFoI4ai3v16 9ww+KUQmNFVHUUgD8zUU0U8SDqJx1dB4SCuMUaKRq+9C40P1LdxSwlb/fFsroCBAGkDp zwv+RQKwED45Tc3SIY4nmYdb97XH32GXMmJ5DEgaJ5hPWtfo9uoyofvQ8qmDC3GdjB2R Zw8w== X-Gm-Message-State: AOAM530T+Ytj9CqM7OachcqjzHwWyw2MDllAaz1d4x+WyQIX5kzEPxWj GcUOAhvmkv3tLnhk0dFvoJ6ciBv8JpQa/w== X-Google-Smtp-Source: ABdhPJyRmIDRecn1bA1c5P7i9pAiRelf9URGv8qE2+CLqPPrwchklBu5Qh5lLi3AWfR0BOX/tLFu7g== X-Received: by 2002:aca:53ca:: with SMTP id h193mr17013374oib.122.1609728309844; Sun, 03 Jan 2021 18:45:09 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id i16sm13255188otc.61.2021.01.03.18.45.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jan 2021 18:45:09 -0800 (PST) Subject: Re: Postgres 12.4 inner join with where statement = 'string' returning error To: pgsql-admin@lists.postgresql.org References: From: Ron Message-ID: <3e55a385-08b3-96a7-dc84-cc34e0adbf4a@gmail.com> Date: Sun, 3 Jan 2021 20:45:08 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------38DC99E29A8128DD4C1E8FD6" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------38DC99E29A8128DD4C1E8FD6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------38DC99E29A8128DD4C1E8FD6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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.
--------------38DC99E29A8128DD4C1E8FD6--