Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL translation problem
This should cover most of it. But I don't know what PIVOT does, so there is still a part missing. Try:
select CODE, AVG(PRICE1) as "The Value"
from ITEMS
group by CODE ;
In article <H_7Y2.10$o1.70_at_news.clear.net.nz>,
"CL" <charlie_at_xenacom.co.nz> wrote:
> Hi
> I am doing a job to rewrite a interface from ACCESS to ORACLE. I meet a
> problem.
> How can I translate the following query to Oracle SQL? I can do that in my
> report.
> It is a simple table with columns CAT, CODE, PRICE1, PRICE2...
>
> TRANSFORM Avg([PRICE1]) AS [The Value]
> SELECT [CODE]
> FROM ITEMS
> GROUP BY [CODE]
> PIVOT [CAT];
>
> Many thanks
>
> Charles
>
>
--
Ed Prochak
Magic Interface, Ltd.
ORACLE services
440-498-3702
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu May 06 1999 - 11:31:47 CDT