List:General Discussion« Previous MessageNext Message »
From:joshg Date:March 22 1999 11:03pm
Subject:ORDER BY not ordering
View as plain text  
I am trying to get the following query to work.  All fields of relevance 
are varchars (though of different lengths).  It does not sort properly.  
It seems, though not absolutely certain, that when the 
project_program field is null, I get problems, e.g. last names out of 
order even though in the same division and project_program.

SELECT
     ID,
     first_name,
     last_name,
     division,
     project_program,
     admin_title,
     appt_phone,
     degree_md,
     degree_np
   FROM directory
   ORDER BY 
     division, project_program, last_name, first_name

It's not the data.  Using group by doesn't help.  Any thoughts 
greatly appreciated


=========================
Josh Greenberg, Esq.
Dowling 302
One Boston Medical Ctr. Pl.
Boston, MA  02118
Tel) 617-414-7415
FAX) 617-414-3833
E-mail) Joshg@stripped
Thread
ORDER BY not orderingjoshg23 Mar
  • ORDER BY not orderingsinisa23 Mar