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 |
goodman2253
Yak Posting Veteran
88 Posts |
Posted - 2011-11-30 : 04:19:40
|
Hi can anybody help mehow to create tables using procedure in sql server 2005every time when i called the procedure table should be formed and i should insert the data in that table and after that i select the reult in a file and then after that i sholud drop the table |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-11-30 : 05:32:44
|
function/procedure.What do you want and what have you tried.More specifically what are you trying to do - can't see a use for creating a table in a procedure like this.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
jassi.singh
Posting Yak Master
122 Posts |
Posted - 2011-11-30 : 06:41:13
|
Please provide us what you have triedsome hints for you:1)Create temp table2)insert data into temp table3)export data from temp table to file i.e table to csv4)finally as it is temp table it will get dropped automatically |
|
|
goodman2253
Yak Posting Veteran
88 Posts |
Posted - 2011-12-01 : 08:08:25
|
when t call the procedure/function the table sould be created.how to do that |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-12-01 : 08:25:44
|
Just use the create table function. Does it matter if others might call it a statement?orcreate proc s_CreateTableasexec ('create table mytable (i int)')go==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
goodman2253
Yak Posting Veteran
88 Posts |
Posted - 2011-12-03 : 11:21:37
|
Thanks.. |
|
|
goodman2253
Yak Posting Veteran
88 Posts |
Posted - 2011-12-03 : 11:26:05
|
Thanks.. |
|
|
|
|
|