home *** CD-ROM | disk | FTP | other *** search
- .Na "dbaltop"
- .Aa
- .Fu
- Return the type of aggregate operator for a particular compute column.
- .Ih "compute column, returning type of aggregate operator"
- .Ih "aggregate operator, returning for a compute column"
- .Sy
- .Sf "int dbaltop(dbproc, computeid, column)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "computeid"
- .Sp "int" "column"
- .Co
- .Bl
- This routine returns the type of aggregate operator for a particular column in a compute.
- For example, given the SQL statement:
- .SD
- .in +5n
- .ne 3
- select dept, name from employee
- order by dept, name
- compute count(name) by dept
- .in -5n
- .ED
- the call
- .I "dbaltop(dbproc, 1, 1)"
- will return the token value for
- .I count
- since the
- first aggregate operator in the first compute is a
- .I count.
- .Bl
- You can convert the token value to a readable token string with
- .I "dbprtype()."
- See the \f2dbprtype()\f1 manual page for a list of all token values and their
- equivalent token strings.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi computeid
- The id that identifies the particular compute row of interest.
- A SQL SELECT statement may have multiple COMPUTE clauses,
- each of which returns a separate compute row.
- The \f2computeid\f1 corresponding to the
- first COMPUTE clause in a SELECT is 1.
- The \f2computeid\f1 is returned by \f2dbnextrow()\f1
- or \f2dbgetrow().\f1
- .Pi column
- The number of the column of interest. The first column is number 1.
- .in -.375i
- .Re
- .br
- A token value for the
- type of the compute column's aggregate operator.
- .Sa
- dbadata,
- dbadlen,
- dbaltlen,
- dbnextrow,
- dbnumalts,
- dbprtype
-