Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Romania
    Posts
    1

    Unanswered: join beetwen 2 different databases

    I want to make a join beetwen two tables from two different databases and ai don't kwon how?
    Database in used is Stud, who contends studenti table and I want to join with table tip_student from Catalog database.
    I try to execute an statement like this:
    select studenti.nume, Catalog.tip_student.denumire from studenti inner join Catalog.Tip_student on studenti.tip_student=Catalog.Tip_student.cod where studenti.cnp=2790909011092;

    Error that occurs is:
    Namespace "catalog" does not exist

    How I can join this tables ???

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: join beetwen 2 different databases

    Originally posted by stuparu
    I want to make a join beetwen two tables from two different databases and ai don't kwon how?
    Database in used is Stud, who contends studenti table and I want to join with table tip_student from Catalog database.
    I try to execute an statement like this:
    select studenti.nume, Catalog.tip_student.denumire from studenti inner join Catalog.Tip_student on studenti.tip_student=Catalog.Tip_student.cod where studenti.cnp=2790909011092;

    Error that occurs is:
    Namespace "catalog" does not exist

    How I can join this tables ???
    Has a user Granted select for both tables?

  3. #3
    Join Date
    Nov 2003
    Location
    hyderabad
    Posts
    12
    hai,
    try the same in a different way. first select the columns from first database and second database by using alias name from each table and place the condition in the 'where'. you will get the desired result.
    bye...

  4. #4
    Join Date
    Oct 2003
    Posts
    33
    you can't do queries between two databases without using dblink.

    Make a view in Stud from the table in Catalog and then use the join with this view.

Posting Permissions

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