Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Get resultset linking two columns

Author  Topic 

Osceria
Starting Member

1 Post

Posted - 2015-04-18 : 05:52:28
Hi,

I've a scenario like this.

I've 3 tables as below:
Table 1 Table 2 Table 3
SPECID FK_SPECID EQUIVALENT FK_SPEC FK_MOSPEC
1 1 EQ01 1 A1
2 A1 EQ02 2 A2

SpecID holds the unique ID for all the records of table 1.

FK_SPECID of table 2 has a foreign key relation with SPECID of table 1 & also FK_SPEC, FK_MOSPEC of table 3 has a foreign key relation with SPECID of table 1

Now take the values of 1st row from Tabl3, it has 1 & A1. both of these values have corresponding Equivalent value in Table 2.

I have input values for FK_SPEC & FK_MOSPEC. Using these how to get its matching equivalent values. Constraints should be maintained. Please help

Thanks,

Osceria.
   

- Advertisement -