Re: [JDBC] PostgreSQL JDBC and sub-select

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "snpe" <snpe(at)snpe(dot)co(dot)yu>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [JDBC] PostgreSQL JDBC and sub-select
Date: 2002-11-15 03:13:58
Message-ID: GNELIHDDFBOCMGBFGEFOEEJICEAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

> On Sunday 10 November 2002 08:51 am, Hannu Krosing wrote:
> > snpe kirjutas L, 09.11.2002 kell 22:51:
> > > Hello,
> > > I work with JDeveloper and PostgreSQL JDBC and I have one problem.
> > > I get error :
> > > sub-SELECT in FORM must have an alias
> > > I can't change SQL command, but it is internal JDeveloper command
> >
> > You could set up query logging in the backend and see what the offending
> > query is. It may still be something you did (a missing or extra
> > something somewhere).
> >
>
> query is like this :
> select * from (select * from tab) where 1=2
>
> This is work with Oracle,DB2,SQL Server
> Postgresql request alias in sub-select in from clause

The SQL standard requires that you alias it. Postgres follows the standard
on this:

select * from (select * from tab) as sub where 1=2;

Chris

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arindam Haldar 2002-11-15 04:17:08 unsubscribe
Previous Message Stephan Szabo 2002-11-15 03:00:09 Re: limiting join results

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-11-15 03:16:05 Re: FOR EACH STATEMENT triggers
Previous Message Bruce Momjian 2002-11-15 03:08:01 Re: psql tab completion

Browse pgsql-jdbc by date

  From Date Subject
Next Message Laszlo Hornyak 2002-11-15 07:13:44 Re: PostgreSQL/Oracle/MSSQL differences (was: streaming result sets: progress)
Previous Message snpe 2002-11-15 02:12:35 Re: streaming result sets: progress