[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 11:04 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] any SQL gurus?

On Jan 21, 2004, at 10:39 AM, Jeff Tillotson wrote:
&gt; Not a SQL guru but wouldn't this work:
&gt; SELECT COPY.owner COPY.title_key TITLE.name from TITLE COPY where 
&gt; TITLE.title_key = COPY.title_key order by COPY.owner;

On Jan 21, 2004, at 10:34 AM, Dylan Northrup wrote:
&gt; I'm not much of a SQL guru, but wouldn't this work:
&gt;
&gt; select t.name from t TITLE, c COPY where c.owner = &quot;whoever&quot; and
&gt; 	c.title_key = f.title_key;

Thanks guys.  Hmm.  Both of these work if I use the DISTINCT keyword.  
But for some reason, such things as DISTINCT COUNT(name) don't work, and
each copy goes toward the total.  I can't really afford to fetch all the
results and count them on the client side.  I shouldn't have used the word
&quot;list&quot;, my mistake.

Hmm.  Looks like the inner join does the same thing--or were these other
queries already implicitly inner joins?  I really dislike databases. :-)

So it's not a list I need, but a count.  Hrmm.

I bet I need sub-selects.  Something like   SELECT COUNT(*) FROM ( 
SELECT DISTINCT )

Thanks for your help.  I'm going to keep banging my head against it.

-- 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="00859" href="msg00859.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="00851" href="msg00851.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="msg00851.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00853.html">[ale] USB-&gt;IDE problems</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00851.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00859.html">[ale] any SQL gurus?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00852"><strong>Date</strong></a></li>
<li><a href="threads.html#00852"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

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