0

I am creating dbfit test cases and I encountered a scenario where I need to check that an item is not included in the results returned by the query. How can I do that?

Thanks,

Ali Haydar
  • 41
  • 7

1 Answers1

0

If you carry out a query to count the number of records that are matching your query then you can check that the result is zero something like

|query |select count(id) as NumberOfRecords from dbo.tablename where criteria='matched'| |NumberOfRecords | |0 |

Andy Smith
  • 56
  • 5
  • Yes that would work. Thanks. However, If I am executing a Stored Procedure and I want to validate that it is not returning a specific record, this solution wouldn't work – Ali Haydar Jul 25 '15 at 03:04