?
Solved

Exporting data form sql 2003

Posted on 2006-05-08
6
Medium Priority
?
160 Views
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.

0
Comment
Question by:robrodp
  • 4
6 Comments
 
LVL 75

Expert Comment

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

Expert Comment

by:Aneesh Retnakaran
ID: 16635943
robrodp,
> 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
0
 

Author Comment

by:robrodp
ID: 16636174
I do not want to backupthe database just one table
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75

Expert Comment

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

Expert Comment

by:Aneesh Retnakaran
ID: 16636258
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'
 

0
 
LVL 9

Accepted Solution

by:
sudheeshthegreat earned 1500 total points
ID: 16637427
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.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

809 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