|
-
Oct 15th, 2006, 04:40 PM
#1
Thread Starter
Hyperactive Member
how to use the MAX function in SQL server?
I want the entire row with those 4 fields returned with the highest attempt number for this statement:
SELECT DISTINCT UserID, QuizID, AttemptNum, DateSaved
FROM tblResults
WHERE (QuizID = 5) AND (UserID = 4)
couldda swarn in real SQL (aka not microsoft's stupid SQL) you can just wrap the AttemptNum in a MAX() clause in the select clause but I guess not. What's the way to do it in their stupid language if they even left a way to do it at all.
I tried to end process on Visual Studio 2005
but PETA stopped me saying it's smart enough
to be a living creature 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|