Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 export to text not getting delimiters
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bill_
Starting Member

38 Posts

Posted - 03/24/2015 :  14:11:13  Show Profile  Reply with Quote
Trying to export query results to a pipe delimited text file but not getting delimiters.
These are the steps I'm taking.

tools
options
query result
sql server
results to text
custom delimiter,|
right click on query pane
results to file
execute query
make file name

A text file's made but with no delimiter whether I pick custom (|) or comma.

How do you get this to work?

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 03/24/2015 :  14:13:19  Show Profile  Visit tkizer's Homepage  Reply with Quote
I just use bcp: bcp.exe "select * from db1.dbo.table1" queryout c:\temp\queryoutput.txt -Sserver1\instance1 -T -c -t| -r\r\n

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000