On Wed, Nov 18, 2009 at 15:47:57, "Dave Crozier" wrote: > Gary, > You can only have one field returned in the where "sub select" (i.e the > right hand side) because you are comparing it to one field A.Cycle in the > right hand side. > > Before giving a solution I need to get a feel for the data and EXACTLY what > you want to return. > > Do you have a unique PK that you can first extract in the sub query as a > single unique entity for each record and then and then extract the full > record for each entity in the main select. That is the most efficient way to > do it. > > Eg, assuming the Unique key is called PK > > Select * ; > >From FileA ; > Where FileA.PK in (select all FileB.PK from FileA FileB where ........) ; > Group by <.....> > > Dave Crozier
Hi Dave, How are you? Hope you're doing well. Many thanks for the reply. > You can only have one field returned in the where "sub select" (i.e the > right hand side) because you are comparing it to one field A.Cycle in the > right hand side. That was indeed my problem. Cheers, Garry _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

