Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Looping Through Returns

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-17 : 17:25:00
PawnyBill writes "I am new at T-SQL and am eager for the power. For now I am stuck on a problem which I think would need to use the Max expression. I am trying to decide out of each Tracking_key if there is one that has a COMPTD_DATE > WOTOBJ and then to give me a Distinct TRACKING_KEY Count of those plus return those records. For now I am having to break up each step in different SELECT Statements and loop through each to accomplish this which is taking to long on large requests. Thanks for any help
SQL SERVER 7, Service Pack 3
Winnt Server 4.0, Service Pack 6?


COMPTD_DATE TRACKING_KEY WOTOBJ
4/19/01 123456 4/19/01
4/20/01 123456 4/19/01
4/19/01 123456 4/19/01
4/19/01 675855 4/19/01
4/21/01 675855 4/19/01
4/19/01 675855 4/19/01


"
   

- Advertisement -