I've an SQL select statement that I use to display some records within a DataList. Within my database there are duplicate records (not in error, they are supposed to be there), but instead of these duplicates showing in the Datalist for every record; I want just one to be shown.
Records in database:
ID Names
1 John
2 Sean
3 Michael
4 John
5 William
Required selected:
John
Sean
Michael
William
Does anyone know who to achieve this?
---------- Post added at 11:18 PM ---------- Previous post was at 10:06 PM ----------
I've found the 'distinct' statement but cant get it to only use one column for the duplicates...
Records in database:
ID Names
1 John 18
2 Sean 18
3 Michael 19
4 John 18
5 William 21
Required selected:
John 18
Sean 18
Michael 19
William 21
Records in database:
ID Names
1 John
2 Sean
3 Michael
4 John
5 William
Required selected:
John
Sean
Michael
William
Does anyone know who to achieve this?
---------- Post added at 11:18 PM ---------- Previous post was at 10:06 PM ----------
I've found the 'distinct' statement but cant get it to only use one column for the duplicates...
Records in database:
ID Names
1 John 18
2 Sean 18
3 Michael 19
4 John 18
5 William 21
Required selected:
John 18
Sean 18
Michael 19
William 21







