Information générale
Forum:
Microsoft SQL Server
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement