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 |
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-03-18 : 02:58:23
|
| Is there in any option to set result to text by queryVaibhav T |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-18 : 03:54:39
|
| I dont know the queryThe shortcut is CONTROL+TMadhivananFailing to plan is Planning to fail |
 |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-03-18 : 05:12:05
|
| Thanks for the reply but through the query can i export the data in text fileas i have a lot of result set with my query and i have to copy and paste it in file.Vaibhav T |
 |
|
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-03-18 : 05:17:20
|
| can be done by BCP utility..EXEC master..xp_cmdshell'bcp "select * from DBANME..TBLNAME" queryout c:\resultset.txt -c -Usa -P' please look for BCP in BOL. |
 |
|
|
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-03-18 : 05:18:22
|
quote: Originally posted by madhivanan I dont know the queryThe shortcut is CONTROL+TMadhivananFailing to plan is Planning to fail
Madhi,OP Requesting for exporting result set to a text file.please correct me if iam wrong. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-18 : 08:41:43
|
quote: Originally posted by haroon2k9
quote: Originally posted by madhivanan I dont know the queryThe shortcut is CONTROL+TMadhivananFailing to plan is Planning to fail
Madhi,OP Requesting for exporting result set to a text file.please correct me if iam wrong.
Thanks. From the Original post it was not much clearHere is one morehttp://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/bcp-export-data-to-text-file.aspxMadhivananFailing to plan is Planning to fail |
 |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-03-18 : 08:45:01
|
quote: Originally posted by madhivanan
quote: Originally posted by haroon2k9
quote: Originally posted by madhivanan I dont know the queryThe shortcut is CONTROL+TMadhivananFailing to plan is Planning to fail
Madhi,OP Requesting for exporting result set to a text file.please correct me if iam wrong.
Thanks. From the Original post it was not much clearHere is one morehttp://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/bcp-export-data-to-text-file.aspxMadhivananFailing to plan is Planning to fail
Original post was that only what you understood but as i m not able to find the option to set result to text by query so this is what the alternative for which i m trying to do.Vaibhav T |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-18 : 08:52:19
|
| If you want to export to text while running the query, press CONTROL+SHIFT+F and run the query. It will prompt you to save the result to a fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|