Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Posts
    9

    Unanswered: Join Between two different databases

    I have the following Statement but I can't seem to get the join working correctly;

    Code:
    INSERT INTO TTOMODULE.dbo.Restrictions2 SELECT * FROM WOLVERHAMPTON.dbo.Restrictions2 WHERE TTOMODULE.dbo.Machines.MACHINENUMBER = WOLVERHAMPTON.dbo.Restrictions2.R_MACHINE
    R_MACHINE is a foreign key and Machinenumber is primary.

    Any help or advice would be great.

    Thanks

  2. #2
    Join Date
    Apr 2009
    Posts
    25
    what's your error message?

  3. #3
    Join Date
    May 2009
    Posts
    9
    The multi-part identifier "TTOMODULE.dbo.Machines.MACHINENUMBER" could not be bound.

  4. #4
    Join Date
    Apr 2009
    Posts
    25
    SELECT * FROM DBNAME1..TABLENAME a
    INNER JOIN DBNAME2..TABLENAME b ON a.LINKFIELD = b.LINKFIELD

Posting Permissions

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