RE: easy question

RE: easy question

 

  

Select count(distinct(items.supplierid)) as number_of_comp
From items.


-----Original Message-----
From: froggy [mailto:[Email Address Removed]
Sent: Wednesday, April 30, 2003 10:03 AM
To: LazyDBA.com Discussion
Subject: 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

Oracle LazyDBA home page