Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2010
    Posts
    5

    Unanswered: Export from SQL (mdf) to Excel

    Please, I would like to export data from SQL database (.mdf) to excel. Do I
    need to install an addin? What is the correct way of this export?
    Thank you for the answer.
    http://www.dbforums.com/db_images_v3...lies/smile.gif

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by gabriellla View Post
    Please, I would like to export data from SQL database (.mdf) to excel. Do I
    need to install an addin? What is the correct way of this export?
    Thank you for the answer.
    http://www.dbforums.com/db_images_v3...lies/smile.gif
    What version of SQL? You have a variety of choices between DTS, SSIS, BCP to name a few. What is the correct way depends on your needs and requirements. I can't say any one way is the correct way, but have used all these methods before with success.

  3. #3
    Join Date
    Feb 2010
    Posts
    5
    The problem is, that the PC is in our laboratory and is connected to X-Ray instrument, it is only connected to intranet not internet and all SW was installed by PANalytical. We bought the instrument in 2006, but PANalytical SW was upgraded three times, so might be the SQL server too. On Monday, I will have a look which version I have. The OS is Windows XP.
    Thank you very, very much for your answer
    gabriellla

  4. #4
    Join Date
    Feb 2010
    Posts
    5
    So we have SQL Server Configuration Manager 2005.090.3042.00
    I do not know, if the server is the same version as it´s manager, but it could be.
    Thank you for any answer.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by gabriellla View Post
    Please, I would like to export data from SQL database (.mdf) to excel. Do I
    need to install an addin? What is the correct way of this export?
    A database usually contains many tables. Before you export data you need to understand the structure of those tables and decide what columns of what tables you want to export. Once you know all that, you can choose the best export method of the several that are available.
    Last edited by n_i; 03-01-10 at 14:59.
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Feb 2010
    Posts
    5
    I think I know a little bit the structure of the tables, which database contents. But I have no idea, how to export data. Please, could you send me a link, where I can find any of the mentioned method?
    Thank you for an answer.

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Well, the simplest way, unless you need to perform this regularly, would be to run an appropriate query in the Management Studio, right-click on the result and choose "Save as delimited file" or something like that; you can then open the file in Excel.

    If you are sufficiently comfortable with command line tools, you can use bcp (bcp Utility) to automate the process, e.g.:

    bcp database.owner.table out file.csv -T -c -t","

    If you have Integration Services installed, you can use that as well.
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Feb 2010
    Posts
    5
    Thank you very much for your advice. I am going to try your recommendation. I am very curious about results!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •