From: Henshall, Stuart - WCP <SHenshall@westcountrypublications.co.uk>
To: 'Josh Berkus' <josh@agliodbs.com>
To: Yan Bai <annie_job@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Difference between Access97 and PostgreSQL
Date: Fri, 1 Feb 2002 10:15:16 -0000
Message-ID: <E2870D8CE1CCD311BAF50008C71EDE8E01F747B5@MAIL_EXCHANGE> (raw)
> -----Original Message-----
> From: Josh Berkus [mailto:josh@agliodbs.com]
> Sent: 31 January 2002 00:58
> To: Yan Bai; pgsql-sql@postgresql.org
> Subject: Re: Difference between Access97 and PostgreSQL
>
>
> Annie,
>
> > My question may out of the range of this forum.
>
> Well, yes. But, since I'm a nice guy, I'll answer your question even
> though it does not relate to Postgres ... if you promise not to do it
> again! In the future, send this question to a more appropriate list,
> such as PSQL-ODBC, where they discuss Paotgres & MS Access.
>
> > When I run the following query under postgreSQL and Access2000, it
> > works well. But Access97 cannot accept it. I got the error message
> > as 'syntax error near FROM', it seems like in Access97,
> there cannot
> > have a subquery after 'FROM'
> >
> > --------------------------------------------------
> > SELECT temp.rating, temp.avgage
> > FROM (SELECT s.rating, AVG(s.age) as avgage
> > FROM sailors s GROUP BY s.rating) as temp
> > --------------------------------------------------
> >
>
> You are exactly correct. MS Access 97 does not support sub-queires in
> the FROM clause. THe only sub-queries supported by Access 97 are
> sub-queries in the WHERE clause.
With this sort of problem (I also vaguely recall ahving a problem with a
union) I tend to make another query (as in an MS Access query that anyone
else would call a view) and use it in the from clause.
Cheers,
- Stuart
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: SHenshall@westcountrypublications.co.uk, josh@agliodbs.com, annie_job@hotmail.com
Subject: Re: Difference between Access97 and PostgreSQL
In-Reply-To: <E2870D8CE1CCD311BAF50008C71EDE8E01F747B5@MAIL_EXCHANGE>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox