Copy tables

  •  

     

    Please help


    Kindest Regards,

    Web programmer

  • Please keep it nice and clean, I was a bit confused on the table because the descriptions were unclear. From your email, intWebID is contained in tblItem not tblContent. After you have copy tblNavigation:

    Here's how you would copy the tblItem table.

    Insert into dbo.tblItem(intWebID, intCategoryID)

    Select n2.intID as intWebID, i.intCategoryID

    from [SourceDB].dbo.tblItem i

    inner join [SourceDB].dbo.tblNavigation n

    on n.intID = i.intWebID

    inner join dbo.tblNavigation n2

    on n2.intCompanyID = n.intCompanyID

    Where

    n2.intCompanyID = 9 (or companyID of your choice)

    Again, the rest of your tables can be copied in the same manner. Going beyond this is doing too much of the work. You should be able to figure it out from here on out.

    Thanks,

    Meng SQL Server DBA/Developer/Enthusiast

    MCTS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply