SELECT p.StuffName, (SELECT Count(c.Table2ID) FROM T_StuffChild c WHERE
c.StuffID = p.StuffID) AS StuffCount FROM T_StuffParent p
Then
<CFOUTPUT QUERY="QueryName">
#QueryName.StuffName# = #QueryName.StuffCount#
</CFOUTPUT>
Or something along those lines.
Alex Santantonio,
Lead Developer
Macromedia Coldfusion 5 Certified Professional
Macromedia Certified Web Site Developer
[EMAIL PROTECTED]
www.doceus.com
-----Original Message-----
From: Robert Everland [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 26, 2001 2:39 PM
To: CF-Talk
Subject: Easy SQL query, brain died
Here is what I am trying to do. I have a table that lists types of
stuff. In another table I refer to this stuff. So say one record will refer
to stuff 1. another to stuff 2, but maybe no stuff 3
how would I make a query to show
stuff 1 = 1
stuff 2 = 1
stuff 3 = 0
My brain isn't working anymore
Robert Everland III
Dixon Ticonderoga
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists