Re: Ambiguous error message

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Ambiguous error message
Дата
Msg-id 20040102180519.A12370@quality.qadas.com
обсуждение исходный текст
Ответ на Ambiguous error message  (Samuel Tardieu <sam@rfc1149.net>)
Список pgsql-sql
On Fri, Jan 02, 2004 at 05:49:46PM +0100, Samuel Tardieu wrote:
> In PostgreSQL 7.4, the following select:
> 
> select texten, total
> from (select protocolid, count(*) as total) from ips where catid=1
>       group by protocolid order by protocolid) as c
>   inner join protocols using (protocolid);
> 
> gives the error message:
> 
> ERROR:  subquery in FROM must have an alias
> HINT:  For example, FROM (SELECT ...) [AS] foo.
> 
> Why isn't the "as c" considered as an alias?

The query has a right parenthesis after "as total" that looks like
it shouldn't be there.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Samuel Tardieu
Дата:
Сообщение: Re: Ambiguous error message
Следующее
От: "Andy Lewis"
Дата:
Сообщение: sort by on two columns