A temporary table created in SP will be droped when SP finishes. However, a temporary table created before SP is called will be visible inside SP and still be available after SP finishes.
>
>We are currently going through OLE db from VFP to SQL Server, and we create at a temporary table, insert lots of records into it, then running queries against the temporary table and other tables. The queries can be different every time, not static queries. This takes a lot of time for building the temporary table (30 - 45 mins).
>
>I think this can be done be done through SP, but we keep reading that as soon as you leave the SP, the temporary table is closed.
>
>Hope this is enough info.
>
--sb--