Exporting data form sql 2003

Posted on 2006-05-08
Last Modified: 2006-11-18
I would like to export data from a table in SQL 2003 in a way that I can import it again transparently.

Some fields like dates just export in ways that the info is not preservered.

Question by:robrodp
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    You can export it using Import / Export wizard to a .CSV file
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    > in a way that I can import it again transparently.
    If you wanna import it again back to the same server, then you can take a backup, and restore the database again

    Author Comment

    I do not want to backupthe database just one table
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    Then it is better to Export the data as a CSV file
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    One more options is to create another table with the same structure in the same database but with different name. Whenever you feels to restore then you can delete/rename the current, rename the backedup table to 'current'
    Something like

    INSERT INTO UrTable_Bak
    SELECT * FROM urTable

    --For restoration
    exec sp_rename 'urTable', 'urTable_old'
    exec sp_rename 'urTable_bak','urTable'

    LVL 9

    Accepted Solution

    csv wouldn't exactly store the date formats correctly. may have problems with mm/dd and dd/mm. export to excel or access and then you can import it back similarly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Via a live example, show how to shrink a transaction log file down to a reasonable size.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now