home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / oracle / 2555 < prev    next >
Encoding:
Text File  |  1992-12-17  |  812 b   |  29 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!caen!saimiri.primate.wisc.edu!zazen!news
  3. From: nmrdb@vms.macc.wisc.edu (BEVERLY SEAVEY)
  4. Subject: What is correct Pro*C syntax for selecting max?
  5. Message-ID: <1992Dec17.190734.21075@macc.wisc.edu>
  6. Sender: news@macc.wisc.edu (USENET News System)
  7. Organization:  University of Wisconsin Academic Computing Center
  8. Date: 17 DEC 92 13:01:12    
  9. Lines: 18
  10.  
  11. I'm writing a Pro*C program that needs to select a maximum on a column.
  12.  
  13. If I write the Pro*C as
  14.  
  15.  
  16.      EXEC SQL SELECT max(seq_number)
  17.      INTO :max_seq
  18.      FROM protein_sequence
  19.  
  20. It hangs up. Removing the max fixes things, but that isn't the result
  21. I want.
  22.  
  23. Sqlplus is perfectly happy with the analogous statement:
  24.  
  25.    SELECT mac(seq_number)
  26.    FROM protein_sequence;
  27.  
  28. IS it possible to do this in Pro*C? 
  29.