[AccessD] Checking for existence of a condition in all child records in SQL

Porter, Mark MPorter at acsalaska.com
Fri Feb 21 12:46:00 CST 2003


I need SQL only answers on this please:

The parent records here are 'Service Orders' and the child records are 'Work
Orders'.  Both have a 'Status' column.

I need to write an SQL statement which shows the 'Service Orders' which have
all child 'Work Orders' where Status = 'Open'.

Service Orders which have SOME Open Work Orders are not to be shown.  Only
Service Orders which have 100% of their Work Orders open.

Any ideas on how to approach this?

Thanks,

Mark Porter


This transmittal may contain confidential information intended solely for
the addressee. If you are not the intended recipient, you are hereby
notified that you have received this transmittal in error; any review,
dissemination, distribution or copying of this transmittal is strictly
prohibited. If you have received this communication in error, please notify
us immediately by reply or by telephone (collect at 907-564-1000) and ask to
speak with the message sender. In addition, please immediately delete this
message and all attachments. Thank you.



More information about the AccessD mailing list