Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text

Links

XODOX
Impressum

#1: Negated SELECT query

Posted on 2009-03-17 17:42:43 by BobTheBowler

------=_NextPart_000_0090_01C9A71F.64C8B630
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

3 tables are related by one-many links.
Employees ---<- Assets ---<- Maintenance

Employees can be assigned =3D> 0 Assets
Assets can have =3D> 0 occurances of Maintenance.

Assets table contains EmployeeIDs and MaintenanceIDs,
but no Foreign Key contraints.


Queries ...
1) which Employees do not have any Assets =3F
2) which Assets have not had any Maintenance =3F
These have been written successfully with Sub-Queries,

I would like to know how they can be done with only JOINs =3F
(that also means without the EXCEPT statement)
Is that too much of a challenge =3F (MySQL 5.0.67)







--
I am using the free version of SPAMfighter.
We are a community of 6 million users fighting spam.
SPAMfighter has removed 12747 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

The Professional version does not have this message

------=_NextPart_000_0090_01C9A71F.64C8B630--

Report this message