cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Julien
Engaged Sweeper

Hey,
We have a few Lenovo clients with only a warrentydate but no purchasedate.
I have seen some topics here that Lenovo only provide the warrentydate and no purchasedate.

I created a Lansweeper report with a calculated purchsedate for Lenovo like that: 

 

 

...
  Case
    When tblassetcustom.Manufacturer Like '%lenovo%' Then DateAdd(YEAR, -3,
      tblassetcustom.Warrantydate)
    Else tblassetcustom.PurchaseDate
  End As [Purchase Date calculated],
  tblassetcustom.Warrantydate,
...

 

 

 It helps a bit.

My question is, is it possible to do a bulk change by import direct to Lansweeper to get all Purchasedates per asset? e.g. based on a CSV file exported from excel or something like that? 

Thank you and best regards
Julien

1 ACCEPTED SOLUTION
ErikT
Lansweeper Tech Support
Lansweeper Tech Support

Hi There,

 

This should be possible but would require advanced SQL code for which Lansweeper does not provide support.
 

You can first import the CSV file in a temporary table. Then build your update query with values of the temp table. When the update is done, delete the temp table.

 

 https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver1...

 

 Final note; I would like to mention that running custom scripts to update the Lansweeper database tables is done at your own risk. As it can break your Lansweeper installation, Lansweeper cannot provide support when things go wrong. 

 

 Always make a backup of your database before making any changes.

View solution in original post

1 REPLY 1
ErikT
Lansweeper Tech Support
Lansweeper Tech Support

Hi There,

 

This should be possible but would require advanced SQL code for which Lansweeper does not provide support.
 

You can first import the CSV file in a temporary table. Then build your update query with values of the temp table. When the update is done, delete the temp table.

 

 https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver1...

 

 Final note; I would like to mention that running custom scripts to update the Lansweeper database tables is done at your own risk. As it can break your Lansweeper installation, Lansweeper cannot provide support when things go wrong. 

 

 Always make a backup of your database before making any changes.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now