
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2021 06:38 PM
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?!
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?!
Labels:
- Labels:
-
General Discussion
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2021 10:05 PM
Can you please share your code for the report?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2021 01:27 AM
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
