Re: Difference between Access97 and PostgreSQL
От | Henshall, Stuart - WCP |
---|---|
Тема | Re: Difference between Access97 and PostgreSQL |
Дата | |
Msg-id | E2870D8CE1CCD311BAF50008C71EDE8E01F747B5@MAIL_EXCHANGE обсуждение исходный текст |
Ответ на | Difference between Access97 and PostgreSQL ("Yan Bai" <annie_job@hotmail.com>) |
Список | pgsql-sql |
> -----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
В списке pgsql-sql по дате отправления: