Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-10-06 : 07:53:21
|
rashima writes "hi pls help me outi m want Data from sql server where i m inputing one file as parameter (for ex Agent_Id in stored procedure).my stored procedure is using one temp table for agent_Id in which user is loading the file.my problem is this if same user use same procedure at same time it obver rides the agent code and no data return if i create one user defined function (that is inline table) to replace my stored procedure.is this solves my problem and return my data fast.Is user defined function create's different instance of table when we call function." |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-10-07 : 18:12:57
|
When temp tables are created, they have unique names behind the scenese. I'd be very surprised if you are actually getting the two instances to collide, unless they are using GLOBAL temp tables (two #s in name). Putting the same code into a function will not solve that problem. Can these be made into local temp tables (only one #) instead?Another option might be to use a Table Variable instead of a Temp Table.---------------------------EmeraldCityDomains.com |
|
|
|
|
|