order by confusion

2005-05-03 Thread Schalk Neethling
Greetings! This might be a stupid question but here goes: I have a table that contains a column entitled current_pos. I want to search this table and then order the results by current_pos. Now I am running the following SQL query on the table: SELECT * FROM ab_leader_board WHERE sex = 'F' and

RE: order by confusion

2005-05-03 Thread Jay Blanchard
[snip] This might be a stupid question but here goes: I have a table that contains a column entitled current_pos. I want to search this table and then order the results by current_pos. Now I am running the following SQL query on the table: SELECT * FROM ab_leader_board WHERE sex = 'F' and cup

Re: order by confusion

2005-05-03 Thread gerald_clark
Schalk Neethling wrote: Greetings! This might be a stupid question but here goes: I have a table that contains a column entitled current_pos. I want to search this table and then order the results by current_pos. Now I am running the following SQL query on the table: SELECT * FROM

Re: SELECT DISTINCT + ORDER BY confusion

2004-07-12 Thread SGreen
: | | Fax to: | | Subject: SELECT DISTINCT + ORDER BY confusion

SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Jon Drukman
I've got a product story setup where there can be multiple stories of a given type for any product. I want to find the names of the products with the most-recently-posted stories of a certain type. This query works well: SELECT p.id,p.title FROM product p join e_prod ep on ep.product=p.id

RE: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Victor Pendleton
Have you tried using a group by clause? Group by title -Original Message- From: news To: [EMAIL PROTECTED] Sent: 7/9/04 3:08 PM Subject: SELECT DISTINCT + ORDER BY confusion I've got a product story setup where there can be multiple stories of a given type for any product. I want

Re: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Jon Drukman
Victor Pendleton wrote: Have you tried using a group by clause? Group by title same problem - the group by happens before the order by and you get essentially random results. -Original Message- From: news To: [EMAIL PROTECTED] Sent: 7/9/04 3:08 PM Subject: SELECT DISTINCT + ORDER

RE: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Justin Swanhart
: Have you tried using a group by clause? Group by title -Original Message- From: news To: [EMAIL PROTECTED] Sent: 7/9/04 3:08 PM Subject: SELECT DISTINCT + ORDER BY confusion I've got a product story setup where there can be multiple stories of a given type for any product. I