Unique items

  • Thread starter Thread starter Geoff Jones
  • Start date Start date
G

Geoff Jones

Hiya

I have a datatable with some columns. I would like to be able to retrieve a
list of the items in a column but only once e.g. if the column held
A,A,B,C,D,E,D then I'd like to be able to retrieve A,B,C,D,E.

Can anybody suggest how this can be done?

Thanks in advance

Geoff
 
Geoff Jones said:
I have a datatable with some columns. I would like to be able to
retrieve a list of the items in a column but only once e.g. if the
column held A,A,B,C,D,E,D then I'd like to be able to retrieve
A,B,C,D,E.

OK; got a little confused by the "sideways" representation of columns
for a second, there, but I think what you're looking for is the "distinct"
keyword, as in

select distinct ColumnName
from TableName
where Thingy = Whatsit
or Whatever

Simply enough if you only want a /single/ column; things get a little
hairier if you're retrieving /more/ than one.

HTH,
Phill W.
 
You mean with a SQL statement? 'Distinct' keyword after SELECT.

SELECT DISTINCT "column_name"
FROM "table_name"
 
Hi,
Use SELECT Distinct ColumnName FROM Table


Hope this will help u........

Regards,
Ritesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top