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

Querry prob.

Status
Not open for further replies.

Ewoud

Programmer
Apr 9, 2003
8
BE
Hi,

I'am searching for a few day to a spec. query can someone help me?

table A:
R1 R2 R3
a - 6 - z
d - 2 - p
a - 5 - y
g - 8 - w
d - 6 - w

I need:
R1 R2 R3
a - 6 - z
d - 6 - w
g - 8 - w

I 've allready try this query
Select R1,max(R2),R3 from a group by R1
R1 R2 R3
a - 6 - z
d - 6 - p ***THIS ISN'T CORRECT***
g - 8 - w

The problem with this query:
R1 - ok
R2 - ok
R3 - i'll get the first record the query see so this ain't the corresponding record

Can some one help me out?

Thx,
 
This exact same question has been answered in the SQL Server forum (although it was posted by a different person?)

See thread183-521291 --James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top