Comparing against calculations?

Oct 7, 2009 at 7:51 PM

I am in love with this tool. Thank you, first and foremost.


My question is:


I am executing a sql command as one of my test asserts. I want to compare the row count (SELECT COUNT(*) FROM mytable) against >0.


This isn't working, even when the returned value of my sql statement is several rows. 


It says "The actual result (19488) did not match the expected result (>0)."


I noticed that the xml is using "&gt0"


So...can you throw me a bone? =)


Coordinator
Oct 8, 2009 at 1:38 AM

Glad you like it.

To do this, you need to set the assert to evaluate as an expression, and use "(int)result > 0" as the value of the assert. See this page for more details - http://ssisunit.codeplex.com/Wiki/View.aspx?title=Using%20Expressions%20in%20Asserts

This feature is only implemented in the source, so you'll need to download the latest and build it to take advantage of it.

Oct 8, 2009 at 3:40 PM

I am running BI/SQL server 2005. Does the latest build work with it?

 

Coordinator
Oct 9, 2009 at 7:16 PM

I haven't done extensive testing on 2005 for the more recent changes (most of my work is against 2008 now). That being said, I don't know of anything that doesn't work against 2005.