>>Or simplify your query. What edition of SQL Server?
>>
>>
>>>I need something more powerful :)
>
>the query is very simple join.
>the issue is this:
>on a sp
>declare a variable table
>uses it ... no problem.
>
>declare the variable table with a primary key and sql stop working.
How many records you insert to variable table?
MartinaJ