home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbaltcolid
- ______________________________________________________________________
-
- NAME: dbaltcolid
-
- FUNCTION:
- Return the column id for a compute column.
-
- SYNTAX:
- int dbaltcolid(dbproc, computeid, column)
-
- DBPROCESS *dbproc;
- int computeid;
- int column;
-
-
-
-
-
-
-
-
- dbaltcolid Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o This routine returns the select-list id for a compute column.
- For example, given the SQL statement:
-
- select dept, name from employee
- order by dept, name
- compute count(name) by dept
-
- the call dbaltcolid(dbproc, 1, 1) will return 2, since name is
- the second column in the select-list.
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
- connection for a particular front end/SQL Server process. It
- contains all the information that DB-Library uses to manage
- communications and data between the front end and SQL Server.
-
-
- 3 Version 4.0 -- 5/1/89 dbaltcolid
- ______________________________________________________________________
- 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
- computeid corresponding to the first COMPUTE clause in a
- SELECT is 1. The computeid is returned by dbnextrow() or
- dbgetrow().
- column - The number of the compute column of interest. The
- first column in a select-list is 1.
-
- RETURNS:
- The select-list id for the compute column. The first column in a
- select-list is 1. If either the computeid or the column are
- invalid, dbaltcolid() returns -1.
-
- SEE ALSO:
- dbadata, dbadlen, dbaltlen, dbgetrow, dbnextrow, dbnumalts,
- dbprtype
-
-
-