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)
 Finding out how many records meet a certain criteria

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-23 : 14:21:39
Hameed writes "I want to find out if there are less than 5 records in a table that meet a certain criteria.

For example,

SELECT COUNT(AssociateAuthor)
FROM tblQuestForSuccess
WHERE AssociateAuthor = 1 and count < 5


I am passing in the AssociateAuthor as a variable to this stored procedure and I want to know if there are less than 5 records by this author.

1. How can I correct this stored procedure so that it works?
2. How do I return this value to an ASP page?

SQL Server 7.0


Thanks,
Hameed Bhatti"
   

- Advertisement -