cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Slicer
Engaged Sweeper III
Hello

I have an excel sheet with computernames and the purchase dates.

Is there any custum update query or action that I can use to update all the computer purchasedates in the CustDevices table based on computername?

Or is there an option to import an excel sheet completly (after some tweaking maybe)

This would be a big timesaver
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
TblCustDevices stores device custom fields, not computer custom fields. You need tblCompCustom for computers.


To import the information you already have, you will have to write a custom script. An example script can be seen below. It updates the purchase dates of computers LAN-001 and LAN-002 and can be executed in the Lansweeper configuration console under Lansweeper\Database Scripts.

Some of our customers have also used Microsoft Access to connect to their Lansweeper databases, to more easily import data.
UPDATE tblCompCustom SET PurchaseDate = '08/27/2012' FROM tblCompCustom INNER JOIN tblComputers ON tblCompCustom.Computername = tblComputers.Computername WHERE (tblComputers.Computer = 'LAN-001')
GO
UPDATE tblCompCustom SET PurchaseDate = '08/28/2012' FROM tblCompCustom INNER JOIN tblComputers ON tblCompCustom.Computername = tblComputers.Computername WHERE (tblComputers.Computer = 'LAN-002')
GO

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
TblCustDevices stores device custom fields, not computer custom fields. You need tblCompCustom for computers.


To import the information you already have, you will have to write a custom script. An example script can be seen below. It updates the purchase dates of computers LAN-001 and LAN-002 and can be executed in the Lansweeper configuration console under Lansweeper\Database Scripts.

Some of our customers have also used Microsoft Access to connect to their Lansweeper databases, to more easily import data.
UPDATE tblCompCustom SET PurchaseDate = '08/27/2012' FROM tblCompCustom INNER JOIN tblComputers ON tblCompCustom.Computername = tblComputers.Computername WHERE (tblComputers.Computer = 'LAN-001')
GO
UPDATE tblCompCustom SET PurchaseDate = '08/28/2012' FROM tblCompCustom INNER JOIN tblComputers ON tblCompCustom.Computername = tblComputers.Computername WHERE (tblComputers.Computer = 'LAN-002')
GO