Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Posts
    13

    Unanswered: no drag and drop of tables in SSMS ?

    Hello,

    I often need to copy a table or a view from one database to another on the same sql server.
    I am using SQL Server Management Studio 2005.
    There is no drag-and-drop way of transfering tables or views.
    (only these boring wizards)

    How could I work easier?
    Are there some (free) tools allowing for some drag and drop?
    Are there some more visual tool than these MS wizards I am wasting my time with?

    Thanks a lot for any suggestion.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Are you wanting to just copy the table structure or do you need the data too?
    Easiest way to copy structure is to rigth click the table "Script Table as" > "CREATE to" > "New Query Editor Window"

    The top line generated will be a USE statement, change this to point at the destination database and run the script.

    Now the table exists in or destination database, if needed you can copy the data using an insert command and 3 part naming.
    Code:
    INSERT INTO destination_database.dbo.table_name
    SELECT * FROM source_database.dbo.table_name
    bish-bash-bosh
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    P.S. that method is by no means the best, just (in my eyes) the easiest on an ad hoc basis.
    George
    Home | Blog

  4. #4
    Join Date
    Jun 2008
    Posts
    13
    Thanks georgev.

    Would you know why ssms works with this "Script ... as" stuff ?
    Basically I upgraded several of my Access databases to sqlserver, and I find this ssms rather strange and old-fashion (reminds me teletype commands!). I must be wrong of course, but why?

    Thanks

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I prefer dos
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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