><snip>
>>3. cannot return a value directly, it only returns a result set, hence the temp table. also, must use temp table rather than table variable, since you cannot
insert into...exec sp..
using a table var.
><snip>
>
>Hi Trey,
>
>Take a look at
How to return a value from dynamicaly executed T-SQL code FAQ #8130
Good to know!
Thanks Sergey
Insanity: Doing the same thing over and over and expecting different results.