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,822  
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 Drive Encryption statuses
by  JacobH   Go to last post Go to first unread
Last post: Today at 5:41:10 PM(UTC)
Report Center Local admin group report based on domain role
by  JacobH  
Go to last post Go to first unread
Last post: Today at 5:24:13 PM(UTC)
Lansweeper Number of scanned IPs
by  wayneRex   Go to last post Go to first unread
Last post: Today at 10:21:01 AM(UTC)
Lansweeper Ticket Summary by Agent?
by  susan.starr  
Go to last post Go to first unread
Last post: Yesterday at 4:41:26 PM(UTC)
Report Center Virtual machines and their host
by  klaus   Go to last post Go to first unread
Last post: Yesterday at 8:44:57 AM(UTC)
Lansweeper Patch Tuesday report, last 3 months
by  Esben.D  
Go to last post Go to first unread
Last post: 9/16/2019 1:38:33 PM(UTC)
Lansweeper Query on 'Assets: Installed software by computer' Report
by  RC62N   Go to last post Go to first unread
Last post: 9/12/2019 5:12:40 PM(UTC)
Lansweeper Adding Comments
by  AZHockeyNut  
Go to last post Go to first unread
Last post: 9/10/2019 7:39:40 PM(UTC)