Code: Select all
INDEX ON FIELDGET(ff) TO Mrk_funi UNIQUE
Code: Select all
INDEX ON FIELDGET(ff) TO Mrk_funi UNIQUE
try thisEugene Lutsenko wrote:How to quickly count the number of unique values in a database column?Code: Select all
INDEX ON FIELDGET(ff) TO Mrk_funi UNIQUE
Code: Select all
*- the following translation is for column total summaries
#xtranslate TOTAL(<field>,<cond>) => ;
{ || TOTALFOOTER( { || < field > }, { || < cond > } ) }
/*------------------------------------------------------------------------
TOTALFOOTER()
Total the column and return result as a string.
SYNTAX: TotalFooter(expB1, expB2, expC1)
<expB1> - code block containing column expression to total
<expB2> - code block while condition
<expC1> - filter expression
RETURNS: String value of total
--------------------------------------------------------------------------*/
FUNCTION TOTALFOOTER( bExpr, bFor )
LOCAL nSaveRec
LOCAL nTotal := 0
nSaveRec := RECNO()
DBGOTOP()
DBEVAL( { || nTotal := nTotal + EVAL( bExpr ) }, { || EVAL( bFor ) },,,, .T. )
DBGOTO( nSaveRec )
RETURN LTRIM( STR( nTotal ) )
so i misunderstood what you want to do...Eugene Lutsenko wrote:COUNT TO
Excuse me. This is due to the fact that I use machine translation into EnglishAuge_Ohr wrote:so i misunderstood what you want to do...Eugene Lutsenko wrote:COUNT TO