|
Thanks Carel...I'll give it a try...and I'll also study up on UNION. Is that like a subselect? On Thu, 24 Jun 2004 20:23:53 +0200, "Carel Teijgeler" <coteijgeler@xxxxxxxxx> said: > Michael, > > A rudimentary shot without testing: > > SELECT 'A' AS Code, a.parent, b.id, c.child, d.id > FROM fileA a, fileB b, fileA c, fileB d > WHERE (a.parent = b.sku AND b.id = 1 > AND c.child = d.sku and d.id = 5 > AND a.parent = c.parent) > UNION > SELECT 'B' AS Code a.parent, b.id, c.child, d.id > FROM fileA a, fileB b, fileA c, fileB d > WHERE (a.parent = b.sku AND b.id = 1 > AND c.child = d.sku and d.id = 9 > AND a.parent = c.parent) > ORDER BY Code, a.parent > > To get the description in you have to put in fileC twice, each with a > different alias. > > In QMQRY you can create a FORM to omit the column Code and break on the > column a.parent. > > Regards, > Carel Teijgeler > > > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > -- michaelr_41@xxxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.