
February 2nd, 2005, 11:14 AM
|
|
|
|
Views and two different database! (distributed database)
ok i am doing distributed database (two database of same stuff in two different locations) lets call them A and B!
now A has tables: customer, branch,
B has: customer (which needs to be referencing Branch table in A)
in B i have created a view:
Code:
create or replace view Branch as select * from branch@Greenwich;
i am then referencing this View from the customers table in B
Code:
create table Customer (
Customer_id Number CONSTRAINT pk_Customer_id Primary Key,
Fname varchar2(15),
......
Branch_no Number,
CONSTRAINT fk_BranchNo FOREIGN KEY (Branch_no) REFERENCES Branch(Branch_no));
but it gives me the following error:
ERROR at line 11:
ORA-02270: no matching unique or primary key for this column-list
PS> i tried using synonyms instead of view but it said there is no table or view called branch. so i am using VIEW!
|