View Single Post
Old 11-21-2003, 02:45 PM  
Mr. Porno King
Confirmed User
 
Join Date: Aug 2003
Posts: 146
Quote:
Originally posted by alex79


let's say the columns are: date, name, location

i want retrire all the row with all thre informations (date, name, location) but name shuld not apeare 2 times..

if i use SELECT DISTINCT * FROM TABLE if there are 2 rows with same name but with different dates then they will be displayed
if i use SELECT DISTINCT name, location FROM TABLE then i will not be able to use the informations about date..

can somebody help me with the right sintax, pls?
Your question doesn't quite make sense.

Lets say that you have these rows:

April 1, Jane, Toronto
April 3, Jane, Edmonton
April 5, Jane, Calgary
April 7, Bob, New York

--

okay.. obviously, you want to get back "April 7, bob, New York" but how do you want the database to choose which other row you get back?

You can make it choose at random, but keep in mind, the data you get back will be random too.
__________________
My Favorite Game
Mr. Porno King is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote