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

Save as in Toad Expand / Collapse
Author
Message
Posted Sunday, June 07, 2009 8:59 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 01, 2012 8:16 PM
Points: 237, Visits: 764
i am trying to save the output of a query to a delimted text file with comma as delimter.

if a column contains a column with column (For example John,smith) John goes to one column and smith to other column

how do i avoid and make it as one column.

Please let me know
Post #730377
Posted Sunday, June 07, 2009 10:24 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:09 AM
Points: 2,863, Visits: 1,703
I.m using SQL2008 so the exact option may differ to mine.

In SQL Management Studio from the tools/options menu look for the "query results" branch on the left hand side.
In results to text the "Output format" has a number of options which includes TAB delimited and also has the ability to specify a custom delimiter


LinkedIn Profile
Newbie on www.simple-talk.com
Post #730391
Posted Tuesday, June 09, 2009 4:54 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 8:39 AM
Points: 459, Visits: 692
Hi,

Are you using Toad for SQL Server? I use the Oracle version (9.7.2), so I don't know if this will be applicable.

Do you have the 'Save Grid Contents' dialog on screen, Export Format: Delimited Text?

Go to String Quoting and pick 'Double Quote String Columns'. Most import tools (including Excel and SQL*Loader) are happy with column values enclosed in double quotes.

Alternatively, you can could change the Delimiter (next option) if your import tool is happy with that . . . I alwasy use ^ - never seen it in data yet . . .

HTH
Post #731309
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse