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!

subquery help

Status
Not open for further replies.

beckwiga

Programmer
Mar 30, 2005
70
0
0
Hello TekTips .. been a while. I was hoping someone could help me with this query. I just need to return only the rows boxed in green. It's basically the most recent date ONLY for each suc_pic. I think I need a subquery I just don't know how to structure it or where to structure it. Any help is appreciated. Thanks in adavnce. beckwiga

 
try this:

Code:
Select Max(a.date_sk) as date_sk,
       a.suc_pic_sk
From   t_factless_pos_date a
Group By a.suc_pic_sk
Order By a.suc_pic_sk

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Perfect, that's just what I needed, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top