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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -