Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HowTo: Release a Table variable
Message
From
12/01/2005 17:47:30
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00976391
Message ID:
00976604
Views:
23
>Hi, Fabio,
>
>I think you should give Daniel's response some additional consideration.
>
>One of Daniel's suggestions was a table-valued UDF that you can use directly in the FROM.
>
>If you have a table variable that's only needed for one or perhaps two queries in your proc, you truly don't need it for the remainder of your stored proc, and you're concerned about resource usage...and additionally you might want to leverage the logic for populating the table variable for future queries...then you should consider a table-valued UDF.
>
>Kevin

- But if i have to uses the @table 3 times on the sp ?
- If the source of @table1 is @table0 or #Tablex or ##Tabley
( to use a tempdb.dbo.sometableName is not a simple solution within a intesive multiusers access )
- If i have to use not deterministic functions ?

The issue is this:
Someone must tell me why not there is RELEASE @table.
If I had implemented DECLARE @table TABLE,
after a second I would have implemented RELEASE @Table.
Simple very simple.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform