Select Distinct DataGrid

G

Guest

I have created a Typed DataSet that renders about 150 records.

I put these into a datagrid that obviously shows me 150 records.

My problem is now only one column is different most of the time.

Is there a (easy) way to get from this situation

ID Title Extra Other Date
01 myTitle extra other 15-02-2006
01 myTitle extra other 16-02-2006
01 myTitle extra other 17-02-2006
01 myTitle extra other 18-02-2006
01 myTitle extra other 19-02-2006
02 myTitle2 extra2 other 15-02-2006
02 myTitle2 extra2 other 16-02-2006
02 myTitle2 extra2 other 17-02-2006
02 myTitle2 extra2 other 18-02-2006
02 myTitle2 extra2 other 19-02-2006

to something like this
01 myTitle extra other details
02 myTitle2 extra2 other details

One problem is that these dates are one of the search items
in my SQl is writtten
WHERE Date BETWEEN date01 AND date02

thx
 
L

Leon Mayne [MVP]

benoit said:
One problem is that these dates are one of the search items
in my SQl is writtten
WHERE Date BETWEEN date01 AND date02

Could you not use something like:

SELECT DISTINCT(ID), Title, Extra, Other, Date
FROM tablename
WHERE Date BETWEEN date01 AND date02

?
 
G

Guest

ok thanks
That's a start !
I''l try to figure out how to retrieve several columns with itinstead of the
single one in the example
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top