Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How Do I Copy a SQL Table In Visual Studio 2008

Posted on 2011-09-29
4
Medium Priority
?
261 Views
Last Modified: 2012-05-12
I'm in Visual Studio, Server Explorer, and I've attached to the SQL server. I go to tables and right-click on a specific table, select copy.

From here I want to be able create a copy of the table. I've clicked around a bit, Googled etc. but I haven't found an option to paste or create a new table this way.

Is this possible or am I just missing the mark here? We have some failry complex tables that are already setup the way I need, and we also have a number of tables that need to be moved from an older SQL 2005 server.

I am not that versed in SQL commands, so I was hoping this would be a viable option.

Thanks in advance!!

0
Comment
Question by:JB4375
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Leo Torres
ID: 36816717
try

Select * into New_table
from  Original_Table
0
 
LVL 8

Accepted Solution

by:
Leo Torres earned 2000 total points
ID: 36816776

If you can even use SSIS

Object Source
then Choose
Object Destination

Source can be table, file, xml, excel
same for Destination

You want to do from table in DB to table in an other db Or even same DB

this link may help
http://www.kodyaz.com/articles/transfer-sql-server-objects-task.aspx
0
 
LVL 11

Expert Comment

by:SThaya
ID: 36890590
Hi,


use the Transfer SQL Server Objects in SSIS . it helps you to transfer all obejcts from one server to another or within the same server .

http://msdn.microsoft.com/en-us/library/ms142159.aspx

Note : All the user's logins are should be active ...
0
 
LVL 1

Author Closing Comment

by:JB4375
ID: 36912895
Thanks!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

782 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