Forum Moderators: open

Message Too Old, No Replies

Limit Results With Same Field Value

         

Knucklehead00

3:47 pm on Nov 14, 2008 (gmt 0)

10+ Year Member



Hey all.

I need a SQL query that does the following:

- Look for any rows that have the same 'name'.
- If a row does have the same name as another row, then only return 1 copy of the name and not 2+.

CURRENT QUERY: SELECT id, name, conference FROM vault_tracks ORDER BY name

wheelie34

9:39 am on Nov 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try using select DISTINCT on the column your targeting the result set from.

HTH