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 1w3xXc-001in5-1d for pgsql-novice@arkaria.postgresql.org; Sat, 21 Mar 2026 14:43:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3xXa-00AbqW-16 for pgsql-novice@arkaria.postgresql.org; Sat, 21 Mar 2026 14:43:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w3xXa-00AbqO-0I for pgsql-novice@lists.postgresql.org; Sat, 21 Mar 2026 14:43:02 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3xXX-00000000Lw7-2knj for pgsql-novice@lists.postgresql.org; Sat, 21 Mar 2026 14:43:02 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-415b23dd6e5so500291fac.3 for ; Sat, 21 Mar 2026 07:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774104177; cv=none; d=google.com; s=arc-20240605; b=O51A3TLzwx3RbHkoGZQ54UuuoEvmwWmZpuZ83z0NxaH1zRtrKtrHu102lTozSUR/MT pIsqP286yuMU1rKUORCW4JqAaj+suyNbs4+hFJxgMa+MdB5tXMTCyhjGYE+Ws9spj3d8 XyhbHpYDXJryYz1YiIaNH4dn763CsODA5f/JwYUch3yQDrhEFmYfY0kRThmo/Ftsz1jh A5avU/4BQD4MxO2SSEtNY09CMw1Nw8Tjgk7LLGgm7/eCLjuz+pozKkQlMvOrtGkxokYw X9NpTCWbKjusT7sqeLXRNFABaOZQoLUY1ouqd01mIf5HnkejoQM3wwBrdkSvG0BF258Z 6s7w== 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:references:in-reply-to :mime-version:dkim-signature; bh=fgub+u7PgvBFbmtDNJetHj1OyMH3DF+ytODDZJih+Ng=; fh=EHCGB/E+zLNWCdshSoVqWYTWBQuN5umxYHnriBAjdkI=; b=dO9yQSPoYpJNnN4/nzN6UmG7ZpFbh+YG5RqVipxV0Uabfsu6gRqYsJ2wLPVHR8rp5T YmEw2bkNbFO1Dn9lM6Hsh/6l+HQi//R/66NTCYqDLQHSlbSL2WndlMJPZtXwuMm9oJiC pFNgTtUfOj4ToVCMI8VmPOTvZL61chReMrgMd7tApqD+Im5VLya3c8mZh4tnFs9l5oq+ F2LQSTXraCM0+NzLUP1VoKejjHceURVCApH0wMYyD+cHPL4spFzq+qkBk5QOTwKeQJxS x/A3EroXl0gf22Cjmzh1NdwBo8VldSgDCjr5f5XgKteUaPmwIrNhBcZfKDiMqst7M5Bd 1PbQ==; 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=1774104177; x=1774708977; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fgub+u7PgvBFbmtDNJetHj1OyMH3DF+ytODDZJih+Ng=; b=M38Lm6brFV5k2BooFBH8u/SYy25DuFFGenDqYzgw7KbtHZ0n2WsGTid7HjMyUqwOEm oons96IKSY0iUhsiWp6mk0AmtobQH7k2hf+uJy7y9l8g2HK3xMD/AkJ/3DvGPbNqi3Xo bjoDXWRYXD5+uhWpZrFRo/sqV/A0D/2kO2YkiQV1uitEIeCM9dMa97BS/r6S26CzPfqv cYO4tx7eRfB1whaeGauXa+Ae5AeL44A51AzMLhwtBK4WVYtDdrw6FzAzupH7hd3/edHF /BXeO4IuSqLonsyzedIW2UqOSALUAu8PWYi7W7L9rhJ+dHHnbGkT6wbktHiSuRyRDee/ jFqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774104177; x=1774708977; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fgub+u7PgvBFbmtDNJetHj1OyMH3DF+ytODDZJih+Ng=; b=cwrya9DNPeNCbOAu4O3FogJ5yolHUCq/h3wowlxRMJmsTI8y3Z17Ud8CUyQ0O5492w TeAjv9AabnflC1jWDJ2r7nzJCnI88k6DMRmFKK6OSl77BC8mjGVhLkvBL/VNxE1TDZep JtIqMGtGEoR5rS+FDKX0f1qqFuqP02rw3cTeVhFR+gWZslYdbSQmuIfX1cnRyejMlOia xFulzjjX9E2dsF0WrS0PiDP5kDatdXBsZ3zAhFoCNLxVwC6GyoXpYCqnGyo/YVQXsH3S 7zhgpxqOrohXQ14emYugyeuCEnNQo4Vthtwh3QYhQKq+kK8phTtWy5LT33/I5K7jddFP 26FA== X-Gm-Message-State: AOJu0Yynoiaxt0B2XLLSaP5cp5YAlz9TzMnZnSOiufJQeEDYxzVzQ/Gs f0PsaKe9MSRdej7nUel7WG0Mp4e6Z/awnm8zwMyMlNk7h6fB6D+svreGSCSlQ5ndUyMWuP4wY20 oI2izf7iK9qSLca9BF205Ffm+fXeuj9Q= X-Gm-Gg: ATEYQzwwsfAz/JCk86d6bETjlg/YtUf4JW6dzh79YnDFJC+WysjlIS04b1xaKss0fy6 xDUntpP0HLPbDoH22l39agJK4aZi8jpDYVIt9aT2ROknCToH35OhmXmc3b2ZosmP4cufpS48VFI knZG9237x1X7dryqf5QRflQ3mY0D4EuaRtQuaykANChHuAzzJp2nBHb/yzXMxIUa7RV/UVmHhGJ pcMwlaC+BKjG9z9PdPW1TlRykNSMXTNUTSsUvuASUYpuRZ9yAVf+6hIUm3nngjoJlQiLzci1Ax8 laSLg5j4zTK7NzHjt0dElVdjavyg6YwjJbbWAF7m0zgpGtIvrA== X-Received: by 2002:a05:6871:314b:b0:417:3580:2946 with SMTP id 586e51a60fabf-41c112ba1ccmr4091453fac.28.1774104177418; Sat, 21 Mar 2026 07:42:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6802:1197:b0:622:3933:832f with HTTP; Sat, 21 Mar 2026 07:42:56 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Sat, 21 Mar 2026 07:42:56 -0700 X-Gm-Features: AaiRm50vdIAqOzCv3kQucQ1SeC6tOriQrFATKjYsJH84Xsh42Og5FIWNrYXgYwM Message-ID: Subject: Re: Merging two queries and I get syntax errors To: Ibrahim Shaame Cc: "pgsql-novice@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000004a25bf064d89d146" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004a25bf064d89d146 Content-Type: text/plain; charset="UTF-8" On Saturday, March 21, 2026, Ibrahim Shaame wrote: > > FROM michango2 a, majina2 b > > WHERE a.mlipaji = 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 join syntax and move the join condition to the ON clause, getting rid of the where clause with the apparent issue. David J. --0000000000004a25bf064d89d146 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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.

--0000000000004a25bf064d89d146--