Hi Daniel,
What if you add back @s1_count? Would it error out? Can you post code for s2p2_results function?
>Sergey,
>
>I doubled checked variable declarations and confirmed that @s1_count is declared as integer.
>When I run the above statement in Query Analyzer the result is 28 ...and no error message:
>declare @fib_lot char(6), @s1_count int
>set @fib_lot = '030363'
>SELECT @s1_count = count(fib_s1) from dsiweb.dbo.s2p2_results
> where fib_s1>0 and inst_type='S'
> and fib_lot = @fib_lot
SELECT @s1_count
--sb--