April 8, 2016 at 12:39 pm
I need to pull a few lines of data from my company's ms sql server 2012 and put it into a text file. I'm a beginner with sql servers and sql in general. I installed sqlcmd and I'm trying to play around with it. Once I connect to the sql server with sqlcmd, it's possible to do what I'm saying right? thanks!!
April 9, 2016 at 6:31 pm
shane.corley (4/8/2016)
I need to pull a few lines of data from my company's ms sql server 2012 and put it into a text file. I'm a beginner with sql servers and sql in general. I installed sqlcmd and I'm trying to play around with it. Once I connect to the sql server with sqlcmd, it's possible to do what I'm saying right? thanks!!
The -o option will get your started. You may need a couple of other options like -h-1 and -s.
The following link is the BOL entry for 2012 SQLCMD.
https://msdn.microsoft.com/en-us/library/ms162773(v=sql.110).aspx
The following Google page will provide some additional hints.
https://www.google.com/?gws_rd=ssl#q=sqlcmd+write+to+text+file
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply