Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Posts
    25

    Unanswered: Single query for multiple databases

    Hi,
    I need to query 2 different databases to compare information in one query, something like below...any ideas how this can be done if a link has not been created between the 2 databases?

    Code:
    select   *
    from     tableA@PROD
    where   tableA.col1 in (select col2
    from     tableB@TEST)
    Thanks!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >any ideas how this can be done if a link has not been created between the 2 databases?
    What does this mean?
    What happens when you issue the posted SQL statement?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2009
    Posts
    25
    It says connection description for remote database not found

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >It says connection description for remote database not found
    so create it.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Feb 2009
    Posts
    25
    Well thats the point you are missing I know how to create a databse link and then make this query work, I am asking if there is another way of querying multiple databases without a database link

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I am asking if there is another way of querying multiple databases without a database link
    DBLINK is the solution.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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