Results 1 to 3 of 3

Thread: sorting data in asscending order

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Posts
    93

    sorting data in asscending order

    if i need to extract from data base in asscending order, wat should i add on the the below statement?

    ViewAppt.RecordSource = "SELECT * FROM APPOINTMENT_T WHERE (PATIENT_ID = '" + NRICtxt.Text + "' ) ORDER BY APPOINTMENT_DATE, START_TIME"

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: sorting data in asscending order

    what type of database r u using? access or sql server or oracle??

  3. #3
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: sorting data in asscending order

    That Query should return your fields in ascending order, ASC is default, and when you want descending order you have to add DESC after each field in Order by clause

Posting Permissions

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



Click Here to Expand Forum to Full Width