Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DISTINCT statement

Status
Not open for further replies.

aw23

Programmer
Nov 26, 2003
544
0
0
IL
I have the following query:

select distinct name, datetime,email,amount from table where datetime >= '1/1/2003'
and description in ('Membership')
order by datetime


My problem is the following, there are many duplicate names in the database, however the subsequent information is different. So distinct is doing nothing. I want it to only select all the data for the distinct names.
 
hi,
distinct will reteive distinct fields u have specified.

u have to do grouping

thread183-848497

try this post.
some one help me in this regard. If ur problem is solved post a star mark for him.


Regards
John philip


*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top