[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



Matthew Brown
 	      (888) 681-2262     .     (770) 795-0089     .
<a  rel="nofollow" href="http://www.cordata.com";>http://www.cordata.com</a>	 

	
*	Windows and Linux Networks
*	Anti-virus
*	Security
*	Email
*	Web Development &amp; Hosting
	
*	Application Development &amp; Hosting




-----Original Message-----
From: ale-bounces at ale.org [<a  rel="nofollow" href="mailto:ale-bounces";>mailto:ale-bounces</a> at ale.org] On Behalf Of Jason
Etheridge
Sent: Wednesday, January 21, 2004 10:20 AM
To: Atlanta Linux Enthusiasts
Subject: [ale] any SQL gurus?

Hi guys, this has been driving me nuts and maybe you would enjoy figuring it
out. :)

I have two tables: TITLE and COPY.  There is a one-to-many relationship
between the two; for any given title, there could be many copies.  
Copies have owners, but titles don't belong to anyone.

	table TITLE:
		field title_key	PRIMARY KEY
		field name	CHAR
	table COPY:
		field copy_key	PRIMARY KEY
		field title_key	FOREIGN KEY
		field owner	CHAR

However, owners would like a list of what titles they happen to have copies
for.  I can do this through brute-force with a programming language, but is
there a single SQL query I could use?  Specifically, MySQL (I don't have
sub-selects)?

I'm sure this is simple and obvious and I'll feel like more of an idiot
later.  *8)

Thanks,
Jason

_______________________________________________
Ale mailing list
Ale at ale.org
<a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00847" href="msg00847.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00838" href="msg00838.html">[ale] any SQL gurus?</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00840.html">[ale] RE: Ale Digest, Vol 5, Issue 83</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00842.html">[ale] USB-&gt;IDE problems</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00838.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00847.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00841"><strong>Date</strong></a></li>
<li><a href="threads.html#00841"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>