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 Lansweeper Reporting Old Assets as New
by  Jpatterson   Go to last post Go to first unread
Last post: Today at 8:09:00 PM(UTC)
Lansweeper Change History or Restore of Custom Reports?
by  GoHawks5  
Go to last post Go to first unread
Last post: Today at 4:20:52 PM(UTC)
Lansweeper agents can't create new tabs
by  Esben.D   Go to last post Go to first unread
Last post: Today at 3:51:07 PM(UTC)
Lansweeper Schedule/Calendar Ticket
by  enush  
Go to last post Go to first unread
Last post: Today at 3:46:21 PM(UTC)
Lansweeper Admins view all helpdesk tickets
by  Esben.D   Go to last post Go to first unread
Last post: Today at 3:44:50 PM(UTC)
Lansweeper Features Questions
by  datev   Go to last post Go to first unread
Last post: Today at 2:03:03 PM(UTC)
Lansweeper Assets disappearing
by  Ian.Prentice  
Go to last post Go to first unread
Last post: Today at 11:39:52 AM(UTC)