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 1w3xhB-001ivz-0T for pgsql-novice@arkaria.postgresql.org; Sat, 21 Mar 2026 14:52:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3xh8-00AfTt-1E for pgsql-novice@arkaria.postgresql.org; Sat, 21 Mar 2026 14:52:54 +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 1w3xh8-00AfTj-01 for pgsql-novice@lists.postgresql.org; Sat, 21 Mar 2026 14:52:54 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3xh6-00000000KuN-2pPG for pgsql-novice@lists.postgresql.org; Sat, 21 Mar 2026 14:52:53 +0000 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-35a1f549e7eso884454a91.0 for ; Sat, 21 Mar 2026 07:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774104772; cv=none; d=google.com; s=arc-20240605; b=JFHkllheVC2X7P8Vt5BXCtXKswrESRDYljGr3KziRKoLSpJeLPyTobRGqk8uHyRgu8 p95I55RYjmncwoydHfcE0f55LnN0BkvqWyjojSmmhDgfF/wZiHmSFZc+j+bzp9+yVZVs Fqmk9ryaiMOYonIpGB7oB9rVj2FUX0wwRNDsA0DWppYvdfUieS72zrGmp39sC9zvp7Fe JkW4E5d9bMa5embpavXuAS+60Vlg7hi5Mbk25YU/L5a27loMzoX5BwnPpPkV5Nwfk79I E5iPTkg+cJ2xrqb1rEC0SDg+Rfpt2M7iIDsOdZV3sIh3aTPs7v+Z7lgQvvZElbZTpyDc Z5Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=gltTgNHS506Pr1OjaVSP8PK9WsbmpMAu/Di/NRrku7c=; fh=cZrQMpt+W1VTpOyuxExYm0yRTE29HUIlZ/tRkdWHA7g=; b=I+TVSyk9KALanBKJT2bg5WoR2NlV9TuwyGh8UXo5KVvwyWH2L9CI3hqLDeU46EbPpK p/MugHg8FCtx9uv3bYfO4DzGr4nVF8zneUId45+mCMjIGnVXJNADTJXWtPqOAIS2kG+a iqjnf+kUQl/my/sm7YrX/I+MC8hLorbOFnrbRvMmWd62CNxjRfYe7LA2XFnatSiNhg3Y /JvcCfI/zqedR6wSU8Ck08VIyx5/DPbYaHSygghW+u5ajVWLxPgKT9j3mP4k/SCjUcy9 fZFzU2x0bwaHJQAcPZDM1pbOuITcD8nVhXEm1k9/XfsZgWY5xH7DPqJBW1mgAyBjtbiW ypMA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774104772; x=1774709572; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gltTgNHS506Pr1OjaVSP8PK9WsbmpMAu/Di/NRrku7c=; b=npd5+kOyfPOg5YyoJz8OgwHRqpuAgX+4T5emHsHjKfMrsiQOvJdzheNp2L39fHs7l6 Kvvzxxt2tjxhwBfsVvyGdOR9cDgfAHhbqT1TIOQn8n8uhHB6g1eeDizyhKRabg5b/0k2 YPLkMMTEMrRPPXVnXaAzbQRyN57KTM5VZGXqZBuP3WMsh+FknSGi1JRxIW5HpFptCavP A4sv9bf3snzq4qjb7BLfndF0ScCEEqnUqQ3LTEE0kymmEdWIZihGt4AemCorsnoJ2DVG vV2OgnGCqwBYdr5h1LBfefHPbylyW352ynHzmuaWHTPUdeNMqiRr4sZLLuI1pAGauzh2 FZ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774104772; x=1774709572; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gltTgNHS506Pr1OjaVSP8PK9WsbmpMAu/Di/NRrku7c=; b=qF1N4tjFCuS+oMjU87pS/t5T2bEUKHnPoIAtORcdEZyLgAkxFFbi92gOXYZwTTQK+u meJQUyEzW10n/dxaNseXZo/3bcqViP0bWIXgtWqIgCuXqK0lLDLP1K9xtlGJsRwpFee1 hOiBFcQ2XCr52U5XMAavPsgavsrOxL8tfbCMQlU+HZ5VlCZnicwjOH4dg3iQb6XPWVI7 UdCkwmlZpvXDXbdGyeLm2lpcRetWBh5UyQtRy89Yv89Dj+IqcL0XNo+nkiQVBs5q8BlK sAekgqfZFj3Vos3YqbQMQzWBaxrlghbBCZZ3njxGkQ/8OqymIKS3voRWYGF1jpQSqx+7 RiFA== X-Gm-Message-State: AOJu0YzQupwXtn5CCTVaeyzD0jv8opaWXnQXd0JpLQW8HHyV2avB3hXY eZAlOjGDfgpXZaAy5WzEpK2xZhQHjHfCQ0aymjX31frUH0QDZr+oKvEYtiyU3wSD8Ye/dM5qBk1 /VSibdyhFPoEJRXWjtSZ+IURcquGlEVk= X-Gm-Gg: ATEYQzxP57EJz0lDpK0JDGxBX7fNV7Bq2QJnOXWYL41nOjia2nf1VRc9AIQQTKU/4tr NqYs6d2AAmH1TZCctBEzd0AtpRubLyNg6p9TEZ/gdWyxeU8Ba7IPYsby43fBZMNwroVB/15otGp zhPZFLR0oOKViWAa6TZ5UXnkt2oRgwxdItgnkLJK3ij5K4d3di4ZL8QRIzTACk78uUd4UXydgTj ANaJ5sbG3QUMdLYgd/P7pLu5uagVZ7tjEysmEYTlcATmQ/l9QFo/6SykibVsmO3Y5legi/rZO4E KGNnF+41fu+gS5TNvK+FpTYdoSbFTUEslkOJ9SfazCIVUP8N/5Q= X-Received: by 2002:a17:90a:ec84:b0:35b:e56e:b5a6 with SMTP id 98e67ed59e1d1-35be56eb622mr525219a91.1.1774104771682; Sat, 21 Mar 2026 07:52:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ibrahim Shaame Date: Sat, 21 Mar 2026 17:52:35 +0300 X-Gm-Features: AaiRm506LaA74P0CU8Ecs48CNoOty7kBce9jTfyF8zRno01smInhhmlz8pNwcX4 Message-ID: Subject: Re: Merging two queries and I get syntax errors To: "David G. Johnston" Cc: "pgsql-novice@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000b5e2cc064d89f43d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b5e2cc064d89f43d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you David for the quick response. I placed the new column two columns before and it works. I just can't understand why it does not when added to the end. But anyway it works where it is now. Thank you again. Ibrahim Shaame On Sat, Mar 21, 2026 at 5:42=E2=80=AFPM David G. Johnston < david.g.johnston@gmail.com> wrote: > On Saturday, March 21, 2026, Ibrahim Shaame wrote: > >> >> FROM michango2 a, majina2 b >> >> WHERE a.mlipaji =3D b.namba >> >> >> Here it does not work and I get the message: >> >> ERROR: syntax error at or near "a" >> LINE 1: ...1 AS miezi_deni FROM michango2 a, majina2 b WHERE a.mlipaji >> >> and it point at a.mlipaji >> > > Nothing seems obviously wrong which leads me to suspect some nonprinting > character issues. Try writing/rebuilding the query in small increments > until you get the error again then manually retype the last added chunk. > Or just take the opportunity to use a more conventional explicit ANSI joi= n > syntax and move the join condition to the ON clause, getting rid of the > where clause with the apparent issue. > > David J. > > --000000000000b5e2cc064d89f43d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you David for the quick response. I placed the = new column two columns before and it works. I just can't understand why= it does not when added to the end. But anyway it works where it is now.
Thank you again.

Ibrahim Shaame=C2=A0

On Sat, Mar 21, 2026 at 5:42=E2=80=AFPM David G. Joh= nston <david.g.johnston@gm= ail.com> wrote:
On Saturday, March 21, 2026, Ibrahim Shaame <ishaame@gmail.com> wrote:

FROM michango2 a,=C2=A0majina2 b=C2=A0

WHERE a.mlipaji =3D b.namba=C2=A0


Here it d= oes not work and I get the message:

ERROR: =C2=A0syntax error at or near &= quot;a"
LINE 1: ...1 AS miezi_deni FROM michango2 a,=C2=A0majina2 b= =C2=A0WHERE a.mlipaji

and it point at a.mlipaji


Nothing seems obviously wrong which leads me to suspe= ct some nonprinting character issues.=C2=A0 Try writing/rebuilding the quer= y in small increments until you get the error again then manually retype th= e last added chunk.=C2=A0 Or just take the opportunity to use a more conven= tional explicit ANSI join syntax and move the join condition to the ON clau= se, getting rid of the where clause with the apparent issue.

=
David J.

--000000000000b5e2cc064d89f43d--