From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ertan Küçükoğlu <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: FirebirdSQL to PostgreSQL |
Date: | 2017-09-12 12:10:50 |
Message-ID: | 31482.1505218250@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
=?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr> writes:
> I have below sql running fine on FirebirdSQL but not on PostgreSQL. As I am
> not the editor of the SQL, I cannot fix it to work with PostgreSQL. Any help
> is appreciated.
You're not being consistent about quoting, e.g. you've got this
> COALESCE(DT.IAIK_OG, 0) AS "IAIK_OG",
which seems to be trying to reference this field of the DT subselect:
> (sum(M.TES_IMARALANICIOG)/(select sum(I.ILC_IMARALANICI_OG) from
> ILCELER_TABLOSU I where I.ILCEADI = 'CÝHANBEYLÝ')*60) as "IAIK_OG",
but it won't match because IAIK_OG is not the same name as "IAIK_OG".
(According to Postgres --- some other systems treat this differently.)
Best rule is to always quote a particular name or never quote it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ertan Küçükoğlu | 2017-09-12 20:22:51 | Re: FirebirdSQL to PostgreSQL |
Previous Message | Ertan Küçükoğlu | 2017-09-12 11:31:47 | FirebirdSQL to PostgreSQL |