Question about SQL Server Manager Studio 2017

Didiiolu 96 Reputation points
2020-11-16T14:23:49.323+00:00

Hello, i don't know if you have some french people in your staff, so i'll write my question in the both langage (french and english)

I would like to copy and insert a table (ItemResource) from a database (Arcadia_test), to another database (Arcadia).
I already tried something, but it was a fail :

SELECT ItemResource
INTO Arcadia
FROM Arcadia_test

If you can help me would be very good please :D . Thanks a lot, Didii

Je voudrais copier et insérer une table (ItemResource) d'une base de données (Arcadia_test), vers une autre base de données (Arcadia).
J'ai déjà essayé cette formule mais qui ne s'est pas avérée être un succès :

SELECT ItemResource
INTO Arcadia
FROM Arcadia_test

Si vous arriviez à m'aider ce serait super s'il vous plaît :D . Merci d'avance, cordialement, Didii

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
0 comments No comments
{count} votes

Accepted answer
  1. Didiiolu 96 Reputation points
    2020-11-17T16:28:43.417+00:00

    My god, i used :

    "USE Arcadia_test;
    USE Arcadia
    SELECT * INTO Arcadia.dbo.ItemResource FROM Arcadia_test.dbo.ItemResource"

    And it works ! Thanks a lot guys !!! :D


3 additional answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 26,586 Reputation points
    2020-11-16T16:14:53.107+00:00

    I would like to copy and insert a table (ItemResource) from a database (Arcadia_test), to another database (Arcadia).

    (1) You can run SQL Server Export and Import Data wizard for that.
    How to Export SQL Server Data with Import and Export Wizard

    (2) Or it could be a simple ETL to implement in SSIS.

    Here is a general outline what needs to be done:

    • You need to create two connections to both databases.
    • You need to create a single SSIS package, add Data Flow Task (DFT) to it.
    • Add OLEDB Source and OLEDB Destination to that DFT.
    0 comments No comments

  2. Monalv-MSFT 5,926 Reputation points
    2020-11-17T03:24:53.41+00:00

    Hi @Didiiolu ,

    Could you please share the error messages in detail?

    Please run the following sql command in SSMS:

    USE MyDB;   /* DataBase1: MyDB */  
    USE MyDB1;   /* DataBase2: MyDB1 */  
    SELECT * INTO MyDB1.dbo.Book FROM MyDB.dbo.Book;  
    

    Hope the following link and pictures will be helpful:

    How to copy tables from one database to another in SQL Server

    40235-beforeinserting.png

    40312-afterinserting.png

    Best Regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues in November--What can I do if my transaction log is full?
    Hot issues in November--How to convert Profiler trace into a SQL Server table?


  3. Didiiolu 96 Reputation points
    2020-11-17T16:24:49.447+00:00

    Hi,
    the error mesage is :

    "Msg 208, Niveau 16, État 1, Ligne 1
    Nom d'objet 'Arcadia_test' non valide."

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.