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,834  
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 Remove all users from old domain
by  cmuter   Go to last post Go to first unread
Last post: 9/20/2019 8:03:58 PM(UTC)
Lansweeper Static IP Address
by  cycleheat  
Go to last post Go to first unread
Last post: 9/20/2019 4:07:16 PM(UTC)
Lansweeper Bitlocker Encryption Recovery Key no information found
by  Stephane   Go to last post Go to first unread
Last post: 9/20/2019 2:26:19 PM(UTC)
Lansweeper InTune Scanning Issues
by  Esben.D  
Go to last post Go to first unread
Last post: 9/20/2019 12:34:59 PM(UTC)
Lansweeper Office 365 scanning issues
by  Esben.D   Go to last post Go to first unread
Last post: 9/20/2019 12:23:30 PM(UTC)
Lansweeper Hard Drive Tracking - Start to Finish
by  Lone Jedi  
Go to last post Go to first unread
Last post: 9/19/2019 8:11:56 PM(UTC)
Lansweeper Lansweeper Reporting Old Assets as New
by  Jpatterson   Go to last post Go to first unread
Last post: 9/19/2019 12:52:14 PM(UTC)
Lansweeper Cannot edit a ticket anymore
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2019 12:32:42 PM(UTC)