Can you help me on the join query ?
presently I am using the following queries:
select Distinct ID,PartNum,PName
from Product,TRLNK246
where
Product.ID in (select Object2 from TRLNK246 where Product= 1) and Product.Status = 'Active'
select Distinct ID,PartNum,PName
from Product,TRLNK246
where
Product.ID in (select Object2 from TRLNK246 where Product= 17) and Product.Status = 'Active'
select Distinct ID,PartNum,PName
from Product,TRLNK246
where
Product.ID in (select Object2 from TRLNK246 where Product= 11) and Product.Status = 'Active'
---------------------------
Here in this case :
Product Object2
1 15
1 16
1 17
17 11
17 12
17 13
11 5
11 6
11 7
---------------------
The above structure is for the Link table TRLNK246 which is a child table of the main Product Table cantaining the distinct Product IDs.
I am fetching the child table products contained in Object2 related to the main Products in Field Product.
I basically thought of a recursive function which will generate the sub-products.
|