Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Gridview Duplicate removal.

 
Thread Tools Search this Thread
Old 02-14-2006, 03:54 PM   #11
Default Re: Gridview Duplicate removal.



Yuan,
You could put the keyword "distinct" after your select and before
your columns in your SQL statement. This will remove all the duplicated
rows.

Bill Gregg


*** Sent via Developersdex http://www.developersdex.com ***


Bill Gregg
  Reply With Quote
Old 02-14-2006, 07:51 PM   #12
 
Posts: n/a
Default Re: Gridview Duplicate removal.
Can you show an example of that Bill?

J

"Bill Gregg" <> wrote in message
news:...
>
> Yuan,
> You could put the keyword "distinct" after your select and before
> your columns in your SQL statement. This will remove all the duplicated
> rows.
>
> Bill Gregg
>
>
> *** Sent via Developersdex http://www.developersdex.com ***





  Reply With Quote
Old 02-15-2006, 03:51 AM   #13
Yuan Ren[MSFT]
 
Posts: n/a
Default Re: Gridview Duplicate removal.
Hi J,

Thanks for your reply!

First of all, thanks for Bill's reminder. Since I don't use the SQL Server
with a long time, I forget there is the "distinct" keyword is more
appropriate at the current stage. For example, there is a table likes below:
num name
1 a
1 a
2 a
2 b
2 b

So, if you use the statement below:
select distinct * from tblduplicated

You will get the result:
1 a
2 a
2 b

Thanks for your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support



Yuan Ren[MSFT]
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview row information disappearing after selectedIndexChanged Ry99 General Help Related Topics 0 07-13-2009 03:35 PM
duplicate files -D- A+ Certification 0 02-22-2004 01:02 AM
Re: Looking for Virus Removal Info MJP A+ Certification 0 07-26-2003 01:57 PM
Re: Looking for Virus Removal Info havinfun69nospam@yahoo.com A+ Certification 0 07-26-2003 01:57 AM
Re: Looking for Virus Removal Info Ghost A+ Certification 0 07-25-2003 11:33 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46