Re: sorting tables

From: Date: Fri, 03 May 2002 08:27:01 +0000
Subject: Re: sorting tables
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18959@lists.php.net to get a copy of this message
On Friday 03 May 2002 16:02, nauti wrote: > Hi everybody > > I am doing a select in my oracle DB where i get some records. These records > are grouped by product id, cost, etc, and amount sold every month. > > Then, i show all regs in a table, but as the ORDER BY is done also with the > month / year, because i want to show how much every month is sold, it > creates a new line even also the product is the same. Then i have my table > with x times the same product, in every month column zero values except the > amount for that month. > > Is there a way to show one product per row with every amount on every month > column? Try incorporating a DISTINCT somewhere in your SELECT. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development *

« previous php.db (#18959) next »