Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
KRH
Engaged Sweeper

I created new report that shows all printers

Select tblPrinters.Computername, tblPrinters.Caption, tblPrinters.Portname,
tblPrinters.Sharename, tblPrinters.Location
From tblPrinters


I want to exclude "Microsoft Office Document Image Writer" from results. How this happens?
2 REPLIES 2
Hemoco
Lansweeper Alumni
Select tblPrinters.Computername, tblPrinters.Caption, tblPrinters.Portname,
tblPrinters.Sharename, tblPrinters.Location
From tblPrinters where tblprinters.Caption not like 'Microsoft Office%'


I used the "%" wildcard as a sample.
KRH
Engaged Sweeper
Lansweeper wrote:
Select tblPrinters.Computername, tblPrinters.Caption, tblPrinters.Portname,
tblPrinters.Sharename, tblPrinters.Location
From tblPrinters where tblprinters.Caption not like 'Microsoft Office%'


I used the "%" wildcard as a sample.


Thanks!

That works fine. I tried to exclude CutePDF too. When i added that cutepdf nothing was excluded anymore. Not even 'Microsoft%'. No errors shown. What's wrong with the code?

Select tblPrinters.Computername, tblPrinters.Caption, tblPrinters.Portname,
tblPrinters.Sharename, tblPrinters.Location
From tblPrinters
Where (tblPrinters.Caption Not Like 'Microsoft%') Or
(tblPrinters.Caption Not Like 'CutePDF%')



Edit:

I think i solved the problem. I need to use 'And' not 'Or.

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now