Re: Table split into separate server and instance
Posted in 2003
"Jonathan Leffler" <jleffler@earthlink.net> wrote in message
news:3EED5C2B.7080501@earthlink.net...
> SELECT E1.id, E1.name, E1.address, E1.telno, E1.dob,
> E2.epfno, E2.password, E2.salary
> FROM HR@instance1:employee AS E1, HR@instance2:employe AS E2
> WHERE E1.id = E2.id;>
> That add's the missing FROM clause (syntax error), and uses table
> aliases to make it easier to spot which material comes from which
> database.
You might be able to put this all in a view to save some complexity in your
code later on.
Something like:
create view employees (id, name, address, telno, dob, epfno, password,salary) as
select E1.id, E1.name, E1.address, E1.telno, E1.dob,
E2.epfno, E2.password, E2.salary
from HR@instance1:employee AS E1, HR@instance2:employee AS E2
where E1.id = E2.id;
-- DCP