Many to Many Select???
From: Mary Assaad <maryassaad_at_hotmail.com>
Date: 7 Feb 2003 08:27:29 -0800
Message-ID: <c4747795.0302070827.26797112_at_posting.google.com>
Hello all! I have three tables, tbcables, tbConnectors, and tbAssembly. tbAssembly is what connects tbCables and tbConnectors since there is a Many to Many relationship between Cables and Connectors. I want to select all the connectors that can be attached to a certain Cable. I've tried
thank you so much!
mary Received on Fri Feb 07 2003 - 17:27:29 CET
Date: 7 Feb 2003 08:27:29 -0800
Message-ID: <c4747795.0302070827.26797112_at_posting.google.com>
Hello all! I have three tables, tbcables, tbConnectors, and tbAssembly. tbAssembly is what connects tbCables and tbConnectors since there is a Many to Many relationship between Cables and Connectors. I want to select all the connectors that can be attached to a certain Cable. I've tried
SELECT Connector FROM tbConnectors WHERE ConnectorID=(SELECT ConnectorID FROM tbAssembly WHERE CableID= (SELECT CableID FROM tbCables WHERE Cable="CableName")
but this doesn't work b/c I get many ConnectorID's ie ("At most one record can be returned by this subquery. (Error 3354)). I'm guessing I need to do some kind of INNER JOIN but I'm not sure how to do it!
any advice would be much appreciated!
thank you so much!
mary Received on Fri Feb 07 2003 - 17:27:29 CET