|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using the count function with TOP
Hi there,
Can anyone help me out of my misery? This statement does not work and i don't know how to fix it: "Select top 50 SID, count(Criteria) as A from ScoreResults where Criteria = -1 and ScoreResults.ID in (Select ID from Player Where FirstName Like '" & strFirstName & "' and LastName Like '" & strLastName & "')order by SID" I am parsing this string through to mssql via VB and get an error and I do not know why. M. |
|
#2
|
|||
|
|||
|
So what is the error?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Using the count function with TOP
The Error is You tried to excecute a query that does not include the specified expression 'SID' as part of an aggregate function.
I am trying to count how often a certain criteria occurs in the last 50 entries of the table. M. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Using the count function with TOP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|