home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dbordercol.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  1.9 KB  |  67 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89               dbordercol
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbordercol
  6.  
  7.   FUNCTION:
  8.        Return the id of a column appearing in the most recently executed
  9.        query's ORDER BY clause.
  10.  
  11.   SYNTAX:
  12.        int dbordercol(dbproc, order)
  13.  
  14.        DBPROCESS *dbproc;
  15.        int       order;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbordercol              Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o This routine returns the id of the column  that  appears  in  a
  30.          specified  location  within the ORDER BY clause of a SQL SELECT
  31.          command.
  32.  
  33.          For example, given the SQL statement:
  34.  
  35.               select dept, name, salary from employee
  36.                 order by salary, name
  37.  
  38.          the call dbordercol(dbproc, 1) will return 3  since  the  first
  39.          column  named in the ORDER BY clause refers to the third column
  40.          in the query's select-list.
  41.  
  42.   PARAMETERS:
  43.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89               dbordercol
  47.   ______________________________________________________________________
  48.            connection for a particular front-end/SQL Server process.  It
  49.            contains  all  the information that DB-Library uses to manage
  50.            communications and data between the front end and SQL Server.
  51.        order -  The id that identifies the particular ORDER BY column of
  52.            interest.   The first column named within the ORDER BY clause
  53.            is number 1.
  54.  
  55.   RETURNS:
  56.        The column id (based on the column's position in the select-list)
  57.        for the column in the specified place in the ORDER BY clause.  If
  58.        the order is invalid, dbordercol() returns -1.
  59.  
  60.   SEE ALSO:
  61.        DBNUMORDERS
  62.  
  63.  
  64.  
  65.  
  66.  
  67.