Re: Help for MSSQL "Compute" equivalent in Postgres

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Help for MSSQL "Compute" equivalent in Postgres
Дата
Msg-id 19008.1081225526@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Help for MSSQL "Compute" equivalent in Postgres  ("Manfred Koroschetz" <mkoroschetz@tekvoice.com>)
Ответы Re: Help for MSSQL "Compute" equivalent in Postgres  ("Manfred Koroschetz" <mkoroschetz@tekvoice.com>)
Список pgsql-novice
"Manfred Koroschetz" <mkoroschetz@tekvoice.com> writes:
> I am having trouble translating the following simple MSSQL query into
> the equivalent Postgres form.

> select A.ProdID, A.Description, A. Qty, A.Price
> from SoldItems as A
> where   A.ListID = 15
> order by A.ProdID
> compute count(A.ProdID),sum(A.Price),sum(A.Qty)

This "compute" construct does not exist in the SQL standard, so you'll
have to forgive us for not immediately knowing what it does ...  if
you'd care to specify exactly what behavior you're trying to achieve,
maybe we could help.

            regards, tom lane

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

Предыдущее
От: "Colin Gillespie"
Дата:
Сообщение: Formating Dates
Следующее
От: Tom Lane
Дата:
Сообщение: Re: multiple statements.. and locking