Secondary Field Sort

Results 1 to 2 of 2

Thread: Secondary Field Sort

  1. #1
    Kennyj Guest

    Default Secondary Field Sort

    When using the ORDER BY statement in an SQL call can there be a secondary field that is sorted? For example <BR><BR>SELECT contact_id FROM Contact_Table<BR>ORDER BY contact_lname ASC<BR>?ORDER BY contact_fname ASC<BR>set contact_num=conn.execute<BR><BR>I would like the primary sort to be last name and then to sort all matching last names by first name. This doesnt seem too much to ask.

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Secondary Field Sort

    SELECT contact_id FROM Contact_Table<BR>ORDER BY contact_lname ASC, contact_fname ASC<BR><BR>you dont need the ASC by default it is ASC

Posting Permissions

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