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 2000 Forums
 SQL Server Development (2000)
 IF A=B and B=C.....

Author  Topic 

charlys
Starting Member

3 Posts

Posted - 2001-03-23 : 09:50:33
Hi,

I have posted a question to the Guru, and I'm wondering if there's a way to know the status of the reply. Anyway, I'll post it here again, I apologize for my impatience, I have been trying to solve this for a while without results.

I have a table with two fields: Parts and Equivalents.

---------------------
Part | Equivalent
---------------------
A | B
---------------------
B | C
---------------------

I need a way to do a query, in which if I ask: give me the equivalent parts of "A" the answer will be "B","C". This is bases in algebra If A=B and B=C then A=C.

I think this have something to do with recursivity, so far I can only get "B" as result.

SELECT Equivalent From temptable WHERE Part = 'A'


I really appreciate any help you can provide me, and again I apologize because this post is already submited to the Guru but I had now way to know the status of the task.

Thanks in advance,

Carlos
   

- Advertisement -