[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

T-SQL Inport/Export data to SQL/CSV without using SSIS

Asked by ttepandi in MS SQL Server

Tags: T-SQL

Hi,
I have a situation where I'm transferring data between two MS SQL 2005 servers and one of the tasks is to retrieve data from one SQL server [S1] (it is also a Linked Server) and export it to a CSV file on a second server with SQL 2005 running [S2].
Rather simple would be to use SSIS and that is what i have been trying to use.
I have few of these SSIS packages that export data to csv file (Text Qualifier set as " !!!) in a SQL Job that runs nightly.
The problem I continuously run into is the connection to S1 cannot be established. I know that the connection is solid as when use a query in that same job as one of the steps it works. To fix this I go into the job, open the offending step, click on the "Data Sources" tab and enter a password into the Source Connection String. The reason for doing this is when I'm creating the SSIS package I choose the option to "Do not save sensitive data". Every now and then I have to either reapply the password or recreate the SSIS package and it's just a pain.

I'm thinking of using the BCP utility to do this but found some super extensive scripts when using it placed in stored procvedures which really seems like an overkill. I would rather not use a SSIS package at all and do this via SQL if at all possible. There's got to be a simple way to export data to a CSV file and in the same token to import data from a CSV file into a SQL 2005 tables.

I would appreciate specific examples on how to achieve both the import and export whatever the method. Few important things to note are that the columns are separated by a comma and all columns are within " (double quotes). This goes for data being exported to file from SQL 2005 table as well as provided in a file for import to a SQL 2005 table.

Sorry for the long post. Thanks a lot.
[+][-]03/12/08 07:49 AM, ID: 21106542Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 08:31 AM, ID: 21107080Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 08:34 AM, ID: 21107116Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 08:42 AM, ID: 21107194Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 08:42 AM, ID: 21107200Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 09:17 AM, ID: 21107587Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 09:23 AM, ID: 21107651Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: MS SQL Server
Tags: T-SQL
Sign Up Now!
Solution Provided By: Zberteoc
Participating Experts: 2
Solution Grade: A
 
[+][-]03/12/08 09:26 AM, ID: 21107693Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 09:36 AM, ID: 21107819Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03/12/08 09:49 AM, ID: 21107991Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/12/08 09:58 AM, ID: 21108103Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/12/08 10:11 AM, ID: 21108281Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 / EE_QW_2_20070628