Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdt6e-006Dru-32 for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 16:43:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdt6c-003F3D-1X for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 16:43:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdt6c-003F35-0N for pgsql-general@lists.postgresql.org; Thu, 08 Jan 2026 16:43:26 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdt6b-004v12-19 for pgsql-general@postgresql.org; Thu, 08 Jan 2026 16:43:25 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 7738D2A14D6 for ; Thu, 8 Jan 2026 08:43:23 -0800 (PST) Date: Thu, 8 Jan 2026 08:43:23 -0800 (PST) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@postgresql.org Subject: Not seeing script error Message-ID: <72d71614-3fa0-1a27-c271-a83ee759941a@appl-ecosys.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The script: select p.person_nbr, p.fname, p.lname, p.job_title, p.direct_phone, p.email, c.company_nbr, c.company_name, c.industry from people as p inner join companies as c on p.company_nbr = c.company_nbr where p.email is not null and industry = 'Chemicals' or industry = 'Energy' or industry = 'Food processor' or industry = 'Manufacturing' or industry = 'Maritime' or industry = 'Transportation' or industry = 'Wood products' group by p.person_nbr, c.company_nbr order by p.person_nbr; The where condition, `p.email is not null' is not working; the results include rows where email is null while all other columns are okay. I had that condition following the industry conditions but that makes no difference. What have I missed? TIA, Rich