From: joshg Date: March 22 1999 11:03pm Subject: ORDER BY not ordering List-Archive: http://lists.mysql.com/mysql/808 Message-Id: <199903222305.SAA67222@fserv2.bu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT 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