Notification

Icon
Error

SQL query to change status of assets

Posted: Thursday, August 1, 2019 4:43:37 PM(UTC)
Kreg

Kreg

Member Original PosterPosts: 26
0
Like
Hi there,

Has anyone ever tried to change the status for many assets via SQL?

We need to change the status for 800 devices.
Based on the serial number lists
Currently there are several states (A/B/C...) I need my 800 serial numbers to be in the "D" state.
Any chance to do that easily ?

Many thanks!
Kreg
Esben.D
#1Esben.D Member Administration Posts: 1,977  
posted: 8/2/2019 8:08:12 AM(UTC)
tblstate has the state ID's of all the states in your installation.
tblassetcustom holds the state of the asset.

So basically, find the state ID you want to switch to. Create an update script with your condition.
Kreg
#2Kreg Member Original PosterPosts: 26  
posted: 8/2/2019 4:10:50 PM(UTC)
Originally Posted by: Esben.D Go to Quoted Post
tblstate has the state ID's of all the states in your installation.
tblassetcustom holds the state of the asset.

So basically, find the state ID you want to switch to. Create an update script with your condition.


Thanks,
Yes very simple in fact ;)

Active Discussions

Lansweeper Default tabs not being deleted.
by  RobertB   Go to last post Go to first unread
Last post: Yesterday at 11:34:50 PM(UTC)
Lansweeper SCCM - Overrighting Lansweeper Info
by  The Boss  
Go to last post Go to first unread
Last post: Yesterday at 9:39:00 PM(UTC)
Lansweeper Windows Defender AV
by  Mikey!   Go to last post Go to first unread
Last post: Yesterday at 6:23:02 PM(UTC)
Lansweeper Changes in the licensing model
by  BullGates   Go to last post Go to first unread
Last post: Yesterday at 4:17:46 PM(UTC)
Lansweeper User deletion requirements
by  Adam Poole  
Go to last post Go to first unread
Last post: Yesterday at 2:45:58 PM(UTC)