Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relations between different databases tables
Message
De
09/06/2003 00:52:29
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Relations between different databases tables
Divers
Thread ID:
00797878
Message ID:
00797878
Vues:
62
Hi

I need to create a relation between different databases tables, for example: the "crm" database table "suppliers" with the "inventory" database table "orders":

ALTER TABLE orders ADD CONSTRAINT FK_suppliers_orders FOREIGN KEY (supli_id) REFERENCES crm.dbo.suppliers(supli_id)

But if I use that sentence I get an error.

Could you give an idea to deal with this problem?. The tables are organized in different databases, because the main database "crm" has the definitions tables that are commons for the others, for example, the table suppliers of "crm" database is common for the database "inventory_company_a", "inventory_company_b", "accounting_company_a", "accounting_company_b", ......, so, I need to keep the integrity, I can´t delete a supplier involved for example, in "orders" in "inventory_company_a" and in "accountig_company_b".

Thank you
Carlos A. Miranda
E.I.S.lnc
President
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform