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 |
kmsql
Starting Member
4 Posts |
Posted - 2007-04-13 : 11:39:53
|
How can I export data from sql server 2005 table to fixed length flat file without using xp_cmdshell option from sql server stored procedure ? |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-04-13 : 12:11:57
|
try the DTS. right click on the DB -> All Tasks -> Export Data. Follow the wizard.************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-13 : 12:26:31
|
You can try BCP as well, if you prefer command-line like me.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
kmsql
Starting Member
4 Posts |
Posted - 2007-04-13 : 13:11:48
|
Thanks for you replies.But the problem is I need this to be done using sql query from a stored procedure. I cannot use DTS or bcp. Executing windows commands from sql server is restricted here. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-04-13 : 13:14:22
|
Then your only option I can think of is through an application. Write up a small VB tool, call the proc to return the result set, create a file through the app. Should be fairly easy.************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
kmsql
Starting Member
4 Posts |
Posted - 2007-04-13 : 13:20:36
|
Thanks.I'm new to those stuffs.Could you help me with sample code snippets or some help documents for doing it. |
|
|
X002548
Not Just a Number
15586 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-13 : 13:54:48
|
You're bad Brett. Bad Peter LarssonHelsingborg, Sweden |
|
|
|
|
|