Say I have a table (lets call it Audit) in SQL Server
AuditID int primary not null,
Name varchar(300),
AuditCount int,
ActualCount int,
AuditDate datetime
The table could have any number of rows with a given AuditID in it. I want to iterate through the table, given an AuditID, and compare the AuditCount with the ActualCount. If they are not equal, then I'll do something else...but first, how do I retrieve one row at a time, and compare the values returned?