cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
luiz_filipini
Engaged Sweeper
Hi All,

I've found out a tblkeyboard, which works very well gathering our keyboard layout language code, but when I get the table added to the query, the same workstation is listed twice or 3 times in the report, it would be possible to prevent assets duplication using this tblkeyboard?!
2 REPLIES 2
brandon_jones
Champion Sweeper III
Can you please share your code for the report?
Brandon wrote:
Can you please share your code for the report?


Sure, as soon as we insert the tblkeyboard to the report, we get many assets duplicated, that's the code.

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblComputersystem.Lastchanged,
tblAssets.Domain,
tblAssetCustom.PurchaseDate As PurchaseDate,
tblAssetCustom.Warrantydate As WarrantyExpiration,
tblAssets.Username,
Case
When (tblKeyboard.Layout Like '%00000407%') Then 'DE'
When (tblKeyboard.Layout Like '%00000409%') Then 'EN-US'
When (tblKeyboard.Layout Like '%00000809%') Then 'EN-UK'
When (tblKeyboard.Layout Like '%00000816%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%00000416%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%00010416%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%0000040a%') Then 'ES'
When (tblKeyboard.Layout Like '%0000041d%') Then 'SWEDISH'
When (tblKeyboard.Layout Like '%0000040c%') Then 'FR'
When (tblKeyboard.Layout Like '%00010415%') Then 'PL'
When (tblKeyboard.Layout Like '%00000415%') Then 'PL'
When (tblKeyboard.Layout Like '%00020409%') Then 'NL'
When (tblKeyboard.Layout Like '%00000410%') Then 'IT'
When (tblKeyboard.Layout Like '%00010407%') Then 'DE-IBM'
When (tblKeyboard.Layout Like '%00000816%') Then 'PT-POR'
Else 'Unknown'
End As Layout,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Inner Join lansweeperdb.dbo.tblKeyboard On tblAssets.AssetID =
tblKeyboard.AssetID
Where tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName

New to Lansweeper?

Try Lansweeper For Free

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

Try Now