I am trying to utilize the custom fields in Lansweeper. I am trying use the follow sql to update the custom1 field if the server name is server01. I'm not sure what I'm doing wrong.
use lansweeperdb
Update dbo.tblAssetCustom
set Custom1 = 'test'
Select tblAssets.AssetID, tblassets.AssetName, tblAssetCustom.AssetID, tblAssetCustom.Custom1
from tblAssets
Inner Join tblAssetCustom on tblAssets.AssetID = tblAssetCustom.AssetID
where tblassets.AssetName = 'Server01'
This script does not do what I intended, it updates all of the fields in tblAssetCustom when I only want to update where tblassets.AssetName = 'Server01'
The reason I am wanting to do this is I have a powershell script that I wrote that will read a .cvs file that is an export from the inventory system that lansweeper replaced and I need to be able to traverse that file and only update records based on specific conditions.
Any assistance would be greatly appreciated.
thanks
Chad