Results 1 to 6 of 6

Thread: Export data

  1. #1
    Join Date
    Oct 2003
    Posts
    16

    Unanswered: Export data

    Hi,

    I usually export data from my sqlserver db to a mdb file. I know there are different destinations like csv, txt, etc...
    But however, how can I export data in a sql script file???? I know i should do it with the sentence "insert into table" but i would like to know if the sqlserver has some option to do this without i have to write the sentence for each rows to insert.
    I know this option in Oracle.

    Thanks for all.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    bcp, dts..
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    He wants to generate individual insert statements for records...

    You will need to write a select statement for each of your tables that generates select strings as output. There is no built-in functionality to do this, probably because it is a very inefficient means of transferring data. I encourage you to use an alternate method.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Oct 2003
    Posts
    16

    export data

    Hi, thanks for your response.

    I have another question, is there any way in sqlserver to generate an mdb file from a select statement????

    Thanks.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    No. That is not what select statements do.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by efl00002
    I have another question, is there any way in sqlserver to generate an mdb file from a select statement????
    Using pure Transact-SQL only, no.

    A linked server can get you most of the way there in the Transact-SQL environment. A SQL Server DTS package can do exactly what you've requested.

    -PatP

Posting Permissions

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