[thelist] Q on SQL 'ORDER BY'

jsWalter jsWalter at torres.ws
Fri Apr 9 18:35:24 CDT 2004


This is what I have....

  SELECT jobs.job_id, jobs.job_title, jobs.job_position, jobs.job_location,
         jobs.job_posted, stations.st_city, stations.st_name
  FROM jobs, contacts, stations
  WHERE jobs.con_id = contacts.con_id AND contacts.st_id = stations.st_id
  ORDER BY jobs.job_title AND jobs.job_posted;

I'm tying to have this returned record set be sorted by Job Title, and then
by Posted date, when Job Titles are the same.

But that is not what is happening.

I can't really tell what it's doing, except it's not doing what I thought it
would do.

Is my syntax wrong?

thanks

Walter

sample output...

» Director of Traffic/Continuity [FT] - WOR Radio, New York City
   offer posted: 2004-03-17

» Assignment Editor [PT] - WHEC-TV, News/Weather/Sports, Rochester
   offer posted: 2004-04-07

» Clerical Assistant [FT] - WBNG-TV, Johnson City
   offer posted: 2004-04-07

» Producer [FT] - WSTM-WSTQ, Syracuse
   offer posted: 2004-04-09

» Sales Assistant [FT] - Clear Channel Radio, Albany
   offer posted: 2004-04-09

» Promotions Director [FT] - Infinity Broadcasting - Buffalo, Buffalo
   offer posted: 2004-03-19

» Promotion Writer/Producer [FT] - WRGB (CBS), Schenectady
   offer posted: 2004-04-07

» Test Title [PT] - WBNG-TV, Somewhere
   offer posted: 2004-03-22

» Main-line Producer [FT] - WSTM-WSTQ, Syracuse
   offer posted: 2004-03-08

» Senior Promotion Producer [FT] - WKBW-TV, Buffalo
   offer posted: 2004-04-07





More information about the thelist mailing list