Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
.csv format from ssms
21 posts, Page 1 of 3
1
2
3
»
»»
.csv format from ssms
Rate Topic
Display Mode
Topic Options
Author
Message
surma.sql
surma.sql
Posted Thursday, August 16, 2012 7:08 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, November 19, 2012 6:56 PM
Points: 104,
Visits: 364
Hello
I want to take data extract into .csv format. I already try from select my result set and save as .csv file.
but people complain about that is not in real csv format.
so please suggest me any other way for csv data file dump.
Post #1345922
Lynn Pettis
Lynn Pettis
Posted Thursday, August 16, 2012 7:22 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 11:18 AM
Points: 21,633,
Visits: 27,490
Have you tried using the Import/Export wizard?
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1345942
surma.sql
surma.sql
Posted Thursday, August 16, 2012 7:24 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, November 19, 2012 6:56 PM
Points: 104,
Visits: 364
Lynn Pettis (8/16/2012)
Have you tried using the Import/Export wizard?
No, because i am exporting my results from query
Post #1345944
Scott D. Jacobson
Scott D. Jacobson
Posted Thursday, August 16, 2012 7:27 AM
Old Hand
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 5:17 PM
Points: 335,
Visits: 841
You can do this. On the screen titled "Specify Table Copy or Query", choose "Write a query to specify the data to transfer". In the next screen, paste your query.
Post #1345949
anthony.green
anthony.green
Posted Thursday, August 16, 2012 7:29 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
You can use the wizard to run a query to export to a flat file.
You can also run the query to file, but to save it as CSV, you would have to put in a ',' in between each column other wise it will export it as one cell, not multiple cells.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1345951
surma.sql
surma.sql
Posted Thursday, August 16, 2012 8:06 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, November 19, 2012 6:56 PM
Points: 104,
Visits: 364
anthony.green (8/16/2012)
You can use the wizard to run a query to export to a flat file.
You can also run the query to file, but to save it as CSV, you would have to put in a ',' in between each column other wise it will export it as one cell, not multiple cells.
I am using temp table as #temp1 in my query
but export wizard don't allow that
so how to handle that?
Post #1345985
anthony.green
anthony.green
Posted Thursday, August 16, 2012 8:10 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
select column1,',',column2,',',column3 from #temp
then export query results to file using ssms
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1345989
Lynn Pettis
Lynn Pettis
Posted Thursday, August 16, 2012 8:14 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 11:18 AM
Points: 21,633,
Visits: 27,490
Here is the problem we face, we can't see what you see. You are using a temporary table, great. Are you exporting directly from the table using a query? Based on what little you have provided, probably. Well, how is the data getting INTO the temporary table? Are you running a query to populate this table or is the data just magically appearing in the table for you? If you are using a query, use that query in the Import/Export wizard to create your csv file.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1345992
surma.sql
surma.sql
Posted Thursday, August 16, 2012 8:22 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Monday, November 19, 2012 6:56 PM
Points: 104,
Visits: 364
Lynn Pettis (8/16/2012)
Here is the problem we face, we can't see what you see. You are using a temporary table, great. Are you exporting directly from the table using a query? Based on what little you have provided, probably. Well, how is the data getting INTO the temporary table? Are you running a query to populate this table or is the data just magically appearing in the table for you? If you are using a query, use that query in the Import/Export wizard to create your csv file.
in my task, i need to load into temp table by year wise and then join to actual table. so i am using temp table
and thats why i having some trouble
Post #1345998
anthony.green
anthony.green
Posted Thursday, August 16, 2012 8:23 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
please provide your query
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1346000
« Prev Topic
|
Next Topic »
21 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.