‎04-26-2018 09:03 PM
‎05-10-2018 10:11 AM
‎05-14-2018 03:39 PM
Charles.X wrote:
You sure you copied and pasted the query correctly into SSMS?
‎05-03-2018 02:21 PM
update tblassets
set Description = Description + ' ' + Username + ' ' + Statename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
‎05-09-2018 03:03 PM
Charles.X wrote:
If you want to add state too it becomes a bit more complex because the statename is stored in a different database table. If you want to add more things you can always look them up in the database dictionary or the report builder in Lansweeper.
This should work:update tblassets
set Description = Description + ' ' + Username + ' ' + Statename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
‎05-03-2018 02:24 PM
Charles.X wrote:
If you want to add state too it becomes a bit more complex because the statename is stored in a different database table. If you want to add more things you can always look them up in the database dictionary or the report builder in Lansweeper.
This should work:update tblassets
set Description = Description + ' ' + Username + ' ' + Statename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
‎05-02-2018 04:28 PM
update tblassets
set Description = Description + ' ' + Username
‎05-02-2018 04:39 PM
Charles.X wrote:
For your specific question, if you write the database script, you can use it in the future too.
For your specific case the script below should work, it will add the last user behind the current text in the description field.
I would recommend creating a backup of your installation before you run the script to be safe, you can find backup instructions here: https://www.lansweeper.com/kb/94/backing-up-your-installation.htmlupdate tblassets
set Description = Description + ' ' + Username
‎05-02-2018 10:23 PM
TylerVice wrote:Charles.X wrote:
For your specific question, if you write the database script, you can use it in the future too.
For your specific case the script below should work, it will add the last user behind the current text in the description field.
I would recommend creating a backup of your installation before you run the script to be safe, you can find backup instructions here: https://www.lansweeper.com/kb/94/backing-up-your-installation.htmlupdate tblassets
set Description = Description + ' ' + Username
Hi Charles,
Thank you so much for your assistance!
If I could just request a walkthrough on backing it up, as I haven't personally done that yet?
Also, is there a way I can also add in the state of the asset in description? Would that be something like
update tblassets
set Description = Description + ' ' + Username + State ?
I really appreciate your time and assistance, thanks again!
‎04-30-2018 12:11 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now