2 databases and 1 query

Results 1 to 2 of 2

Thread: 2 databases and 1 query

  1. #1
    Isabelle Guest

    Default 2 databases and 1 query

    Is it possible to query two different databases within a single query? If it is possible, please tell me how I can do that. Thanks a lot.

  2. #2
    G Waddell Guest

    Default RE: 2 databases and 1 query

    Yes I&#039ve done it but it is very messy.<BR>I used a Microsoft SQL Server with two databases x and y. x had a DSN setup to it y didn&#039t both were on the same server and could be viewed through the same enterprise manager. <BR>I used x dsn to connect in the normal way and then accessed as follows.<BR>If I wanted to access something in x I just said: <BR>(Table name).(Column) <BR>If I wanted to get something in y I had to use:<BR>y.dbo.(Table name).(Column) <BR><BR>eg Select Users.Fullname, y.dbo.Cities.Street from Users JOIN (y.dbo.Cities .....<BR><BR>This is the only way I know how to do it.<BR><BR>

Posting Permissions

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