Help for MSSQL "Compute" equivalent in Postgres

From: "Manfred Koroschetz" <mkoroschetz(at)tekvoice(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Help for MSSQL "Compute" equivalent in Postgres
Date: 2004-03-30 21:16:18
Message-ID: 20040330T161618Z_B1B3000E0000@tekvoice.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I am having trouble translating the following simple MSSQL query into the equivalent Postgres form.
Aggregate functions seam the way to go, but I have not been able to reproduce the totals at the
end of the query (not on each individual row).

Original MSSQL Query:

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)

Appreciating any help in advance,

Manfred Koroschetz
mkoroschetz(at)rkmus(dot)com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Paul Semenick 2004-03-30 22:10:32 dotnet stored procedures with postgresql
Previous Message Manfred Koroschetz 2004-03-30 20:59:39 Equivalent of MSSQL "PATINDEX" ?