Returns the bylist for a compute row.
LPCBYTE dbbylist (
PDBPROCESS dbproc,
INT computeid,
LPINT size );
where
A pointer to an array of BYTES containing the numbers of the columns that compose the bylist for the specified compute. The names of the columns are available by calling dbcolname. If the computeid is out of range, null is returned.
The size of the array is returned in the size parameter. A size of 0 indicates that either this particular compute has no bylist or the computeid is out of range.
A SELECT statement's COMPUTE clause can contain the keyword BY, followed by a list of columns. This list, known as the bylist, divides the results into subgroups based on changing values in the specified columns. The COMPUTE clause's row aggregate is applied to each subgroup, generating a compute row for each subgroup.
Call this function after dbresults has returned SUCCEED.
Assume the following command has been executed:
select dept, name, year, sales from employee order by dept, name, year compute count(name) by dept,name
The call dbbylist(dbproc, 1, &size) sets size to 2 because there are two items in the bylist. It returns a pointer to an array of 2 BYTES, which contain the values 1 and 2, indicating that the bylist is composed of columns 1 and 2 from the select list.
dbadata, dbadlen, dbaltlen, dbalttype, dbcolname, dbgetrow, dbnextrow, dbresults