Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get the syntax right
Message
From
04/09/2008 19:07:01
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01344993
Message ID:
01345000
Views:
10
My savior! (again) Thanks! (That was embarrassing by the way - can't believe I got a brain cramp on that one) *G*



>
>SELECT Company, MAX( Number)
>...
>GROUP BY Company 
>
>
>>sQL SERVER 2000
>>
>>A company field and a number field in each record. I want to find the highest number used in the number field for each company.
>>
>>Ex:
>>
>>Company         Number
>>ABC               1
>>DEF               1
>>DEF               2
>>DEF               3
>>GHI               1
>>
>>Should pull:
>>
>>ABC     1
>>DEF     3
>>GHI     1
>>
>>
>>I just can't get it....
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform