dcsimg
Results 1 to 6 of 6

Thread: Copying the data (tables or column names) from one Database to Another Database

  1. #1
    Join Date
    Feb 2006
    Posts
    13

    Copying the data (tables or column names) from one Database to Another Database

    Hello again, sorry I got a lot of questions...

    We are inputting Standard cost data in one database say ex. DB01. I need to copy this information everytime to the Standard cost column in one database ex. DB02. Is this possible?

    Thanks again in advance, best regards

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

  3. #3
    Join Date
    Feb 2006
    Posts
    13
    Thanks so much, in my book that I am reading it talks about tables only not database. May I ask then what would be the syntax if to call out a table of another database? Can't thank you enough...

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Try something like this in db02:

    insert into table select ... from db01..table where ...

  5. #5
    Join Date
    Feb 2006
    Posts
    13
    Hello again to all,sorry if you feel my inquiry is never ending ^.^

    if I will not use triggers (as it seems complicated to me) may I suggest the following scripts to copy column data from one database to another database.

    Update DB02.dbo.<tableName>.stdost
    Set DB02.dbo.<tableName>.stdcost=db1.dbo.<tableName>.s tdcost
    where DB02.dbo.<tableName>.item_no. = DB01.dbo. <tablename>.item_no

    Please let me know your votes ^.^

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Possible if don't require real time data sync between tables.

Posting Permissions

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