That was awesome... Jamie, Anthony, Matthew, Shawn, Andy, Steven, anyone else - you guys rule. I got that sucker working like pie! Thanks again.
Adam. > -----Original Message----- > From: Jamie Jackson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 28, 2002 10:48 AM > To: CF-Talk > Subject: Re: Hypothetical SQL question > > > select * > from people, grades > where people.id = grades.peopleID > and people.id in ( > select people.id > from people, grades > where people.id = grades.peopleID > and grades.grade = 'a' > ) > > Something like that? May have screwed up something in there, but > that's how I'd do it. > > Jamie > > On Thu, 28 Mar 2002 10:31:30 -0600, in cf-talk you wrote: > > >Hypothetical SQL question: > > > >I have a table called PEOPLE and a table called GRADES. I'd > like to return a > >list of people and all of their grades and then output the > results in a > >cfoutput, grouping by peopleID. Ok, that's easy enough, but > what if I only > >want to return people that have an A as one of their grades? > What type of > >condition do I use to achieve this? Currently I'm able to > pull the people > >that have an A, but it won't return the other grades, so it > ends up with a > >bunch of people with just one or more A's - it won't show > their B's, C's, > >and D's. > > > >This seems way to easy, but I'm struggling with it this > morning for some > >reason, maybe someone can give me a little push. > > > >Adam. > > > > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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

