Bernie, first, as far as I know (AFAIK,?) when you use DISTINCT, it's not a function, so try :
 
SELECT COUNT(DISTINCT OrderNO) FROM MLITMLN
 
I can' really address the second of your command options, but, if the COLUMN in question is PK'd or RULE'd UNIQUE, then it would already be DISTINCT.
 
Hope the former helps,
Steve in Memphis
----- Original Message -----
Sent: Thursday, September 05, 2002 2:41 PM
Subject: count 6.5++

sel count(distinct(orderno)) from mlitmln
gives error col count not found
 
sel distinct(count(orderno)) from mlitmln
ignores the distinct and just counts all the rows.
 
so how can I count the number of orders in this table?
(the same orderno can occur many times)
 
Bernie Lis
Megabytes, Inc.

Reply via email to