cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pedaleo
Engaged Sweeper
I'm new!

I have a custom report (Username)&his(Computer) :

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Username
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssetCustom.State = 1 And tblComputersystem.PartOfDomain = 1

But also I want to filter asset names starting by NB*** and PC***. I don't need the other named assets.

Is this possible?

many thanks


1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Technically, it would be
Where (tblAssets.AssetName Like 'PC%') Or
(tblAssets.AssetName Like 'NB%')

As you wrote it, the two conditions are Assetname contains 'PC' OR Assetname contains 'NB'. Given that, you would get a match for Assetname = 'wibblePCwobble' where, according to your initial question, you only want it to match things like 'PCwibble' and 'NBwobble'.

View solution in original post

2 REPLIES 2
RCorbeil
Honored Sweeper II
Technically, it would be
Where (tblAssets.AssetName Like 'PC%') Or
(tblAssets.AssetName Like 'NB%')

As you wrote it, the two conditions are Assetname contains 'PC' OR Assetname contains 'NB'. Given that, you would get a match for Assetname = 'wibblePCwobble' where, according to your initial question, you only want it to match things like 'PCwibble' and 'NBwobble'.
pedaleo
Engaged Sweeper
the answer is:

Where (tblAssets.AssetName Like '%PC%') Or
(tblAssets.AssetName Like '%NB%')

New to Lansweeper?

Try Lansweeper For Free

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

Try Now