Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Export Data in Text File Using SQLCMD in SQL SERVER 2005 Expand / Collapse
Author
Message
Posted Saturday, February 14, 2009 9:32 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 10:55 PM
Points: 544, Visits: 65
Comments posted to this topic are about the item Export Data in Text File Using SQLCMD in SQL SERVER 2005
Post #657284
Posted Tuesday, March 24, 2009 9:17 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 12:33 AM
Points: 824, Visits: 2,038
Great script. Keep up the good work.

My only difficulty is that xpcommandshell is forbidden at some of my production sites.


ATB

Charles Kincaid

Post #682476
Posted Wednesday, November 4, 2009 5:16 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, November 4, 2009 5:14 PM
Points: 1, Visits: 0
Okay I seem to be missing something here, the query seems to fail at the SET command. May seem like a silly question but I am failing to also see where the query gets inputted into all this. Can some one please help...the description of the script sounds like a perfect fit for what I am trying to do. I have 3 sql scripts that I have to run in order to get a output which I copy paste into txt file. This script sounds like it would eliminate that problem.
Post #813933
Posted Wednesday, March 24, 2010 2:02 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 24, 2010 2:00 PM
Points: 1, Visits: 3
What is the max size of the file that can be created using this method? I am trying to write a text file in more or less same manner, but it wont write file above 2 MB and the table contents would definitely make the file size go upto or > 10 MB.

Please suggest.
Post #889315
Posted Friday, April 22, 2011 11:17 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, October 21, 2013 11:43 PM
Points: 945, Visits: 1,234
Nice script! As an alternate workaround you could also make use of bcp command.

Thanks


Amol Naik
Post #1097537
Posted Tuesday, April 26, 2011 5:38 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 18, 2014 10:11 AM
Points: 19, Visits: 94
This seems to be nice. However, I ahve a question. I am trying to get SQL to create a tab delimited text file but I keep getting a comma delimited text file with the stored procedure I use. Now, I am wondering what kind of text file is created using the code you have given also will it be possible to specify what kind of text file can be output?
Thank you,
Asha
Post #1099141
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse