agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
To: pgsql-sql@postgresql.org
Subject: Re: FirebirdSQL to PostgreSQL
Date: Tue, 12 Sep 2017 23:22:51 +0300
Message-ID: <001601d32c04$e8f83bb0$bae8b310$@1nar.com.tr> (raw)
In-Reply-To: <31482.1505218250@sss.pgh.pa.us>
References: <000401d32bba$b83ca550$28b5eff0$@1nar.com.tr>
	<31482.1505218250@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Tom Lane
> Sent: Tuesday, September 12, 2017 3:11 PM
> To: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] FirebirdSQL to PostgreSQL
>
> =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan.kucukoglu@1nar.com.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

Thanks you Tom.

That was it. For now, I simply removed all quotes and query executed just fine.




-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (3+ messages)

Message-ID: <001601d32c04$e8f83bb0$bae8b310$@1nar.com.tr>
Permalink:  ../001601d32c04$e8f83bb0$bae8b310$@1nar.com.tr/
Also on:    postgresql.org/message-id/001601d32c04$e8f83bb0$bae8b310$@1nar.com.tr

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-sql@postgresql.org
  Cc: ertan.kucukoglu@1nar.com.tr
  Subject: Re: FirebirdSQL to PostgreSQL
  In-Reply-To: <001601d32c04$e8f83bb0$bae8b310$@1nar.com.tr>

* 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