How to count number of unique records of a field in progress openedge 4gl? -


i have customer table field age . how can count how many distinct ages there ?

you can in abl using for-loop , break , counter. there built in aggregate functions (accum) in abl seen in wild...

define variable integer     no-undo.  each record no-lock break record.age:     if last-of(record.age) do:         = + 1.     end. end. message "there " " unique ages" view-as alert-box. 

or crippled built in sql:

select count(distinct age) record. 

Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

sql server - database first change primary key from int to uniqueidentifier -

mysql - SQL, Recursive Query -