public inbox for pgsql-novice@postgresql.org
help / color / mirror / Atom feedFrom: David G. Johnston <david.g.johnston@gmail.com>
To: Ibrahim Shaame <ishaame@gmail.com>
Cc: pgsql-novice@lists.postgresql.org <pgsql-novice@lists.postgresql.org>
Subject: Re: Merging two queries and I get syntax errors
Date: Sat, 21 Mar 2026 07:42:56 -0700
Message-ID: <CAKFQuwZR6wOYTjVGKpk=ZjUJ=VkdT7ZfYHbe1Di4daPMy16hGw@mail.gmail.com> (raw)
In-Reply-To: <CAJOWwD7r5e_s=X1ZJEc0jVYdcGiMnkGik0m=Q=1t8hmBTT0vFQ@mail.gmail.com>
References: <CAJOWwD7r5e_s=X1ZJEc0jVYdcGiMnkGik0m=Q=1t8hmBTT0vFQ@mail.gmail.com>
On Saturday, March 21, 2026, Ibrahim Shaame <ishaame@gmail.com> 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.
reply
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-novice@postgresql.org
Cc: david.g.johnston@gmail.com, ishaame@gmail.com, pgsql-novice@lists.postgresql.org
Subject: Re: Merging two queries and I get syntax errors
In-Reply-To: <CAKFQuwZR6wOYTjVGKpk=ZjUJ=VkdT7ZfYHbe1Di4daPMy16hGw@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox