Returns the bylist for a COMPUTE row.
SqlByList$ ( sqlconn%, computeid%, column% )
where
A binary string of column positions for the bylist in the SELECT statement of the current SQL commands.
A COMPUTE clause in a SELECT statement can contain the keyword BY, followed by a list of columns. This list, known as the bylist, divides the results of the COMPUTE clause into subgroups based on changing values in the specified columns. The COMPUTE clause's row aggregate is applied to each subgroup, generating a COMPUTE clause row for each subgroup.
The number of columns is equal to the length of the binary string and can be determined by calling LEN( ) with the returned string. Each character is a binary value representing the position of a column in the bylist.
Call SqlByList$ after SqlResults% returns SUCCEED.
The following program fragment shows how to convert a binary value to an integer to get the number of a column position:
ByList$ = SqlByList$(Sqlconn%, ComputeID%) DIM ByListNumber(LEN(ByList$)) as Integer FOR x% = 1 to LEN(ByList$) ByListNumber(x%) = ASC(MID$(ByList$,x%,1)) NEXT x%
SqlAData$, SqlADLen&, SqlAltLen%, SqlAltType%, SqlColName$, SqlGetRow%, SqlNextRow%, SqlResults%