Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    14

    Unanswered: Question on Inserting to a different server

    What would be the into statement when I am trying to do an insert into another database from SQL

    basically want to do something like this but its not working quite right

    insert into DatabaseName.TableName


    Any help would be greatly appreciated...Thanks

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    insert server.db.dbo.table values(...)

    server - linked server. See BOL fro details.

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    You can use SELECT...INTO to create an identical table definition (different table name) with no data by having a FALSE condition in the WHERE clause.

    To transfer data between the databases you can take help of DTS which is easy and manageble.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

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