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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Question

Status
Not open for further replies.

joero4

Programmer
Dec 21, 2001
8
US
I have a sql problem I have data in a table like the so...

MYTABLE
--------------------
USER_ID IND DATE
1 Y 10/20/2002
1 N 11/20/2001
1 Y 12/20/2003
2 Y 10/22/2002
2 N 12/20/2003
And so on...

I need to grab the latest IND field for each unique user_id. I know how to do this for one user, but I need to create a view with this info. So the view would contain one record for each user containing the user's ID, what teh IND value is and the date. The Date has to be the latest Date (That's my problem) Please HELP!!!

Thanks,
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top