SQL - not exists -


i couldnt find clear answer questions, should simple one. trying computers dont have word installed. query seems giving me wrong data. ideas? thanks!

 select distinct name   dbo.vcomputer v  name not in                   (                    select name                    dbo.vcomputer                    (dbo.vcomputer.installedsoftware n'%word%'))) 

try this

with not exists

select name  dbo.vcomputer v not exists                  (                    select name                    dbo.vcomputer s                    s.installedsoftware n'%word%'                  ) 

with not in

select name dbo.vcomputer v name not in                 (select name                  dbo.vcomputer s                  s.installedsoftware n'%word%'                ); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -