Multiple relationship for the same field


hello !

i have situation :

table : article

id

name

category

.........................

table : services

id

name

nr

value

-------------------------

table : sell_item

id

item_id

quantity

price

value

----------------

now problem : field item_id on sell_item table can id  an article or service. need create double relationship field 1 article table 1 service table.

is possible ?

if not , or if i'm wrong how can solve situation ?

thank you.

hello,

please try following resource:

http://stackoverflow.com/questions/10253986/sql-foreign-key-issue-with-2-parent-tables


resource offers 3 options.

hope helps.

regards,

alberto morillo
sqlcoffee.com





SQL Server  >  Getting started with SQL Server



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........