Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A clean way to do this - join cursor with SQL
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00543385
Message ID:
00543781
Views:
13
Hi Sanjay,

My understanding is that the global temp table will be automatically dropped "when the session that created the table ends and all other tasks have stopped referencing them. The association between a task and a table is maintained only for the life of a single Transact-SQL statement. This means that a global temporary table is dropped at the completion of the last Transact-SQL statement that was actively referencing the table when the creating session ended."

Is that not the case?

Cheers,

Andrew

>Hi Mark,
>
>Just expanding on what Andrew has already mentioned, a single # would be enough to create a temporary table in SQL Server which would be available only to the connection that created it. The nice thing about it is that when the connection is closed, the temporary table is cleared by SQL Server. With a global temp table (using ##) the advantage is that it will be available to any connection, but you clear up yourself by dropping the table afterwards. It'll stay there until SQL server is re-started.
>
>Cheers,
>
>
>>Hi Mark,
>>
>>You need a ## to create a global temporary table. From Books On Line (the Create Table topic):
>>Global temporary tables are automatically dropped when the session that created the table ends and all other tasks have stopped referencing them. The association between a task and a table is maintained only for the life of a single Transact-SQL statement. This means that a global temporary table is dropped at the completion of the last Transact-SQL statement that was actively referencing the table when the creating session ended.
>>
>>Cheers,
>>
>>Andrew
>>


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform