+ Reply to Thread
Results 1 to 4 of 4

Thread: SELECT CLAUSE

  1. #1
    Guest.Visitor Guest

    Default SELECT CLAUSE

    How do I can get serial number column in the SELECT clause? For example in the SELECT * FROM EMPLOYEEDB will return all the records from the file EMPLOYEEDB.In the above statment I want an additional column which will give the serial number for the selected statments. Some other SQL products is having NUMBER(*) function ,this function is giving the serial number for the selected records.But how do I get the result in STRSQL on AS/400.

  2. #2
    Guest.Visitor Guest

    Default SELECT CLAUSE

    On Friday, November 20, 1998, 04:13 PM, Derek Butland wrote: On Friday, November 20, 1998, 04:59 AM, Jeff Importico wrote: Good to know, sometimes you feel like the only one who looks at the source and says to the compiler, what do you mean it isn't right? You arent the only one Jeff...
    The weird part is I save examples so that I won't have to go through it again, and it (seu) still tells me it ain't right! I have the whole OPNQRYF CL command printed out and sitting at arm's length, can't count how many times I've had to refer to it. .... just trying to make it to the finish line ....

  3. #3

    Default SELECT CLAUSE

    I'm not sure I understand, but you could try the rrn function. Maybe that's what you want.
     select rrn(custmas), cusno, cusnm from custmas order by cusnm desc 

    On Sunday, November 22, 1998, 10:35 PM, Kannan wrote: How do I can get serial number column in the SELECT clause? For example in the SELECT * FROM EMPLOYEEDB will return all the records from the file EMPLOYEEDB.In the above statment I want an additional column which will give the serial number for the selected statments. Some other SQL products is having NUMBER(*) function ,this function is giving the serial number for the selected records.But how do I get the result in STRSQL on AS/400.

  4. #4

    Default SELECT CLAUSE

    On Sunday, November 22, 1998, 10:35 PM, Kannan wrote: How do I can get serial number column in the SELECT clause? For example in the SELECT * FROM EMPLOYEEDB will return all the records from the file EMPLOYEEDB.In the above statment I want an additional column which will give the serial number for the selected statments. Some other SQL products is having NUMBER(*) function ,this function is giving the serial number for the selected records.But how do I get the result in STRSQL on AS/400. Kannan, What do you mean whenyou say "serial number for the selected records"? Do you maybe mean relative record number? My terminology is strictly based on the world of the AS/400, and in that realm serial number has nothing to do with the database. Help me understand what you need. src="http://www.geocities.com/SiliconValley/Grid/1212/images/Freshpt80.gif"width ="140" height="25"> The Fresh Produce Specialists

    Michael Daly, Sr. P/A FreshPoint, Inc. (972) 392-8169

+ Reply to Thread

Similar Threads

  1. Result of case statment is a different "having" clause
    By coteijgeler@chello.nl in forum SQL
    Replies: 4
    Last Post: 06-20-2005, 02:36 PM
  2. Date comparison in where clause
    By Guest.Visitor in forum SQL
    Replies: 6
    Last Post: 11-17-2004, 11:08 AM
  3. Select 0 record if exists, else select max value
    By David Abramowitz in forum SQL
    Replies: 2
    Last Post: 04-09-2002, 05:02 AM
  4. Order by clause when Creating views...
    By T.Holt in forum Programming
    Replies: 3
    Last Post: 07-20-2001, 09:49 AM
  5. Redefine clause in COBOL
    By Guest.Visitor in forum Programming
    Replies: 4
    Last Post: 11-12-1999, 04:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts