Re: Problems with a Query between 7.3 and 8.2

From: Holm Tiffe <holm(at)freibergnet(dot)de>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problems with a Query between 7.3 and 8.2
Date: 2008-06-04 12:05:42
Message-ID: 20080604120542.GA83636@pegasus.freiberg-net.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

A. Kretschmer wrote:

> am Wed, dem 04.06.2008, um 12:47:41 +0200 mailte Holm Tiffe folgendes:
> >
> > Hi,
> >
> > I have to migrate an existing System from PostgreSQL 7 and 8.2.
> > There is a query that I'm not fully understand. It is running with
> > 7.3.21 generating two notices about missing FROM's:
> >
> > select poid,prodort.bez1 as prodort,sum(anz) as anz,
> > art,bez1 from best_dat where type='P' and relid=best_hdr.relid
> > and best_hdr.prod_date='20.04.2008' and poid=prodort.id
> > group by poid,prodort.bez1,art,bez1
> > order by poid,prodort.bez1,poid,art,bez1;
> >
> > NOTICE: Adding missing FROM-clause entry for table "prodort"
> > NOTICE: Adding missing FROM-clause entry for table "best_hdr"
>
> Add prodort and best_hdr to your FROM-clause in your query, this
> behavior follows on the sql-spec.
>
>
>
> Andreas
> --
> Andreas Kretschmer
> Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
> GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
>

select poid,prodort.bez1 as prodort,sum(anz) as anz,
art,best_dat.bez1 from best_dat,prodort,best_hdr where type='P'
and best_dat.relid=best_hdr.relid and best_hdr.prod_date='04/20/2008'
and poid=prodort.id group by poid,prodort.bez1,art,best_dat.bez1 order by
poid,prodort.bez1,poid,art,bez1;

I have changed it to the above, can you please take a look over this?

Thanks and thanks to ramasubramanian..

Holm
--
Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe,
Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583
www.tsht.de, info(at)tsht(dot)de, Fax +49 3731 74200, Mobil: 0172 8790 741

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2008-06-04 12:14:58 Re: 3 SELECTs rolled into 1 ?
Previous Message A. Kretschmer 2008-06-04 11:35:50 Re: Problems with a Query between 7.3 and 8.2