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 |
|
panwang
Starting Member
2 Posts |
Posted - 2003-10-20 : 20:47:54
|
| Create PROCEDURE TEST1ASCREATE TABLE #t(LsID int NULL,vNo varchar(60) NULL,vName varchar(60) NULL,dPrice decimal(10,2) NULL)insert into #t(LsID,vNo,vName,dPrice) values(22,'001','235',232.22)select * from #tALTER TABLE #t DROP COLUMN LsIDselect * from #tdrop table #tgo |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-10-20 : 20:50:03
|
| seehttp://www.nigelrivett.net/AccessTempTablesAcrossSPs.htmlThe SP resolves the object structure when it compiles. You are then changing it so it gets confused.You can access the changed structure from another SP or dynamic sql.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
panwang
Starting Member
2 Posts |
Posted - 2003-10-20 : 20:59:07
|
| it can not help me.please notice drop column after insert data to temp table |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-10-20 : 21:39:19
|
| insert into #t(LsID,vNo,vName,dPrice) values(22,'001','235',232.22)select * from #tALTER TABLE #t DROP COLUMN LsIDexec ('select * from #t')drop table #t==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|