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 - 2002-01-17 : 11:16:40
|
| Harish writes "Hi,Here is a small example of a procedure which simply return the rows from a table. I am using SQL Server 7.0CREATE PROCEDURE [F_MYPROC] ASSELECT * FROM T_EmployeeNow the my problem is can I pass a name of temporary table, whichis dynamically created in an application (VB) and from there I call this procedure to return the row of this temp table.Following example I have tried, but failed. System given me 'Incorrect Syntax Error' at select statementCREATE PROCEDURE [F_MYPROC] @MYTABLE VARCHAR(30)ASSELECT * FROM @MYTABLE!!! CAN ANYBODY HELP ME OUT !!!Because from this example I can create some complex procedure which really need in my application." |
|
|
lfmn
Posting Yak Master
141 Posts |
Posted - 2002-01-17 : 13:06:05
|
| We had the same problem with ASP pages where I work. Our 'Fix' was to use a random number generator combined with a string to create a table name, pass the permanent 'temp' table name into the process and then delete the table after it was no longer needed. We also have a job which runs every night to sweep up any of these permanent 'temp' tables which escaped being dropped.cursors are like hammers - sometimes you have to use them, but watch your thumb! |
 |
|
|
|
|
|