Please help, I have the following:
Machine Software
-- --
PC Maker PC Software
-- -- -- --
a1 gateway a1 xxx
a2 dell a1 yyy
a3 hp a2 xxx
a4 other a2 yyy
a3 yyy
a4 xxx
a4 yyy
I need to find pc's made by dell or hp that do not have the software
xxx loaded (in this case a3).
Thanksselect
pc
from
machine
inner join
software
on
machine.pc = software.pc
WHERE
machine.maker = 'dell'
and
software.software = 'xxx'
HTH
"d4" <d4mann@.gmail.com> wrote in message
news:1129304789.325373.54820@.o13g2000cwo.googlegroups.com...
> Please help, I have the following:
> Machine Software
> -- --
> PC Maker PC Software
> -- -- -- --
> a1 gateway a1 xxx
> a2 dell a1 yyy
> a3 hp a2 xxx
> a4 other a2 yyy
> a3 yyy
> a4 xxx
> a4 yyy
> I need to find pc's made by dell or hp that do not have the software
> xxx loaded (in this case a3).
> Thanks
>|||Or even...
select
pc
from
machine
inner join
software
on
machine.pc = software.pc
WHERE
machine.maker IN( 'dell' , 'hp' )
and
software.software NOT IN( 'xxx' )
Helps if i read the question properly :)
> "d4" <d4mann@.gmail.com> wrote in message
> news:1129304789.325373.54820@.o13g2000cwo.googlegroups.com...
>|||Try:
select
m.*
from
Machines m
where
m.maker in ('dell', 'hp')
and nor exists
(
select
*
from
Software s
where
s.PC = m.PC
and s.Software = 'xxx'
)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"d4" <d4mann@.gmail.com> wrote in message
news:1129304789.325373.54820@.o13g2000cwo.googlegroups.com...
Please help, I have the following:
Machine Software
-- --
PC Maker PC Software
-- -- -- --
a1 gateway a1 xxx
a2 dell a1 yyy
a3 hp a2 xxx
a4 other a2 yyy
a3 yyy
a4 xxx
a4 yyy
I need to find pc's made by dell or hp that do not have the software
xxx loaded (in this case a3).
Thanks
Showing posts with label followingmachine. Show all posts
Showing posts with label followingmachine. Show all posts
Subscribe to:
Posts (Atom)