You have to create a temp table in SP1. It'll be visible in SP2.
>Hello, Just to finally understand something and try to find a workaround.
>
>
>SP1 runs "Exec SP2"
>
>SP2 creates a temporary table, say "Select * into #Temp1 from AnyTable"
>
>SP1 needs to use #Temp1, but it seems that SP2 is a separate batch? The #Temp1 table no longer exists.
>
>
>We want to create a temporary table in the called procedure SP2, but the scope must be extended to the calling procedure SP1.
>
>We could create non-temp tables, but of course we don't want to worry about assigning the unique name or deleting de table after use.
>
>Any ideas how you implement this?
>
>Thanks,
>Juan C.
--sb--