Re: Many to One to Many Prob
Posted in 1996
> >Would anyone have any information on getting around this problem using >Informix? > >Thanks. > A little (!) more information would be useful. However, if you're talking about joining two tables with a many to many relationship, check out the "Informix Guide to SQL: Tutorial" chapter on database design (I don't have my copy with me, sorry). I think the basic advice is to create an intermediate table containing just the primary key of each of the original tables. eg tab1 tab2 ---- ---- tab1_pk tab2_pk data1 data_a data2 data_b datr3 data_c Create a third table: tab3 ---- tab1_pk tab2_pk Each unique combination of joined records in tab1 and tab2 would then have a unique row in tab3. Another way around this that I have seen can be done in PERFORM. Don't create the third table. Create a screen form using tab1 and tab2, and place the following in the instructions section: tab1 master of tab2 tab2 master of tab1 I have seen this working very well where tab1 was a list of suppliers, and tab2 a list of products, including a generic name for the product and a trade name. You can search for a supplier in tab1, hit 'd' and find all associated products, or you can search for a product/generic name, and find all suppliers of that product. I hope this is what you wanted. Cheers, Richard.