froggy,
You should be able to do a count distinct e.g.
select count(distinct supplierID)
from items
Hope this helps.
Regards
Chris
froggy <[Email Address Removed] on 30/04/2003 15:02:44
Please respond to froggy <[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] easy question
i have to count how many supplier there is, so im counting the
supplierID, but sometimes the suplierID ocur several times.
How can i count it only one time ?
exemple:
2
2
1
3
6
6
there is 4 suppliers (not6 like i get actualy)
SELECT COUNT(ITEMS.SUPPLIERID) AS NUMBER_OF_COMP
FROM ITEMS
thanks
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these terms:
http://www.lazydba.com/legal.html
_________________________________________________________________
--------------------- End of message text --------------------
This e-mail is sent by the above named in their
individual, non-business capacity and is not on
behalf of PricewaterhouseCoopers.
PricewaterhouseCoopers may monitor outgoing and incoming
e-mails and other telecommunications on its e-mail and
telecommunications systems. By replying to this e-mail you
give your consent to such monitoring
Oracle LazyDBA home page