473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Select Distinct DataGrid

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

Nov 19 '05 #1
4 1555
benoit wrote:
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

?
Nov 19 '05 #2
Yes but you cannot use select distinct in a DataView
from a Typed DataSet

"Leon Mayne [MVP]" wrote:
benoit wrote:
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

?

Nov 19 '05 #3
benoit wrote:
Yes but you cannot use select distinct in a DataView
from a Typed DataSet


OK, does this help?
http://support.microsoft.com/default...b;en-us;326176
Nov 19 '05 #4
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
"Leon Mayne [MVP]" wrote:
benoit wrote:
Yes but you cannot use select distinct in a DataView
from a Typed DataSet


OK, does this help?
http://support.microsoft.com/default...b;en-us;326176

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin Feuersteiner | last post by:
Dear Group I'm having trouble with the clause below. I would like to select only records with a distinct TransactionDate but somehow it still lists duplicates. I need to select the...
2
by: mfyahya | last post by:
I have two tables, both containing an 'authors' column. Is there a way to get a unique list of authors from the two tables? I tried SELECT DISTINCT `authors` from `table1`, `table2`; but I got an...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
9
by: Kelvin | last post by:
Okay so this is baking my noodle. I want to select all the attritbutes/fields from a table but then to excluded any row in which a single attributes data has been duplicated. I.E. Here's my...
6
by: John M | last post by:
Hi, The line below is used to feed a combobox. (It is from a database which is used to log pupil behaviour!) The 'incidents' table contains a list of students who have been involved in incidents....
18
by: mathilda | last post by:
My boss has been adamant that SELECT DISTINCT is a faster query than SELECT all other factors being equal. I disagree. We are linking an Access front end to a SQL Server back end and normally are...
4
by: Anna | last post by:
Hi all, I have a query in ASP.NET that selects text from a memo field in Access (among other things). The query appears to be truncating the text at 255 characters. I've done a little research...
6
by: Bob Stearns | last post by:
I am getting unwanted duplicate rows in my result set, so I added the DISTINCT keyword to my outermost SELECT. My working query then returned the following message: DB2 SQL error: SQLCODE: -214,...
5
by: Daniel Wetzler | last post by:
Dear MSSQL experts, I use MSSQL 2000 and encountered a strange problem wqhile I tried to use a select into statement . If I perform the command command below I get only one dataset which has...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.