home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbnumcompute.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  987 b   |  43 lines

  1. .Na "dbnumcompute" 
  2. .Aa
  3. .Fu
  4. Return the number of COMPUTE clauses in the current set of results.
  5. .Ih "compute clauses, determining the number of"
  6. .Sy
  7. .Sf "int dbnumcompute(dbproc)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Co
  10. .Bl
  11. This routine returns the number of COMPUTE clauses in the current set of results.
  12. The application can call it after
  13. .I "dbresults()"
  14. returns SUCCEED.
  15. For example, given the SQL statement:
  16. .SD
  17. .in +5n
  18. .ne 4
  19. select dept, name from employee
  20.     order by dept, name
  21.     compute count(name) by dept
  22.     compute count(name)
  23. .in -5n
  24. .ED
  25. the call
  26. .I "dbnumcompute(dbproc)"
  27. will return 2 since there are two COMPUTE
  28. clauses in the SELECT statement.
  29. .Bz
  30. .Pa
  31. .Pi dbproc
  32. A pointer to the DBPROCESS structure that provides the connection
  33. for a particular front-end/\*S process.  It contains all the
  34. information that \*L uses to manage communications and data between the
  35. front end and \*S.
  36. .in -.375i
  37. .Re
  38. .br
  39. The number of COMPUTE clauses in the current set of results.
  40. .Sa
  41. dbnumalts,
  42. dbresults
  43.