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 a recordset

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-09 : 13:38:19
calvin writes "Hello,
I am somewhat new to SQL progamming and stored procedures. I need to loop through a table and count how many times let's say a bottle of milk, a bottle of OJ and a bottle of wine have been sold between two dates. The different bottles of beverages are stored in one field. Let's say the name of the field is "bottledBeverages"(these bottles of beverages are selected from a dropdown box in an application). The end result should be something like:

milk 9
OJ 4
wine 16

Thanks,
Calvin"
   

- Advertisement -