February 1, 2011 at 12:05 pm
SQL2005- I need to export data (query results, not a whole table) to a text file with ^ between data and | between records. I do not know where to begin. And if there is any T-Sql coding, please provide. The file will be called OrgFileName.txt (if that helps) Thanks in advance.
February 1, 2011 at 12:13 pm
Personally, I'd use an SSIS flatfile export and put in a calculated column with | to add at the tail. Then use ^ as your column separator.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
February 1, 2011 at 8:49 pm
Did you consider BCP for this? Here is the link: http://msdn.microsoft.com/en-us/library/ms162802.aspx
Swarndeep
http://talksql.blogspot.com
February 7, 2011 at 7:32 am
BCP if you're only doing it once. SSIS (like Craig suggested) if it's going to be repeated more than 2 times.
Don't be scared by SSIS. It's rather simple to use for jobs like this.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply