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 |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-05-17 : 05:03:10
|
| Dear Experts,an you please tell me what is the problem there in my query?SELECT *,ROWNUM = IDENTITY (INT, 1, 1) INTO #T FROM +'(' + @A + ')'+ TAB order by chkthanks in advanceVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2007-05-17 : 05:12:35
|
| Table Name cannot be specified dynamically like this..Use dynamic sqlSet @sql = 'SELECT *,ROWNUM = IDENTITY (INT, 1, 1) INTO #T FROM (' + @A + ') TAB order by chk'exec @sql |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-05-17 : 05:15:57
|
| Thank you gupta for the solution, can you please see the procedure post of me? there, can i modify this with @A ?VinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-05-17 : 07:37:31
|
| More on dynamic sqlwww.sommarskog.se/dynamic_sql.htmlMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|