![MHScripts MHScripts](https://community.lansweeper.com/html/assets/User_Avatar.png)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2019 05:25 PM
Hello,
I want to create a report that basically looks at the model of a machine and assigns a date to it in a custom column.
I am wondering if I could create a custom table or something within LS that would basically have:
Model1 – 2011
Model2 – 2012
Etc.
Or would there be a better way to do this?
Thanks!
I want to create a report that basically looks at the model of a machine and assigns a date to it in a custom column.
I am wondering if I could create a custom table or something within LS that would basically have:
Model1 – 2011
Model2 – 2012
Etc.
Or would there be a better way to do this?
Thanks!
Labels:
- Labels:
-
Report Center
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2019 05:21 PM
If your list isn't too long, you could set up a CASE statement to output the model year.
SELECT
...
CASE
WHEN tblAssetCustom.Model IN ('OptiPlex 7010', 'OptiPlex 9010')
OR tblAssetCustom.Model LIKE 'Latitude E6530%' THEN 2012
WHEN tblAssetCustom.Model = 'OptiPlex 7020' THEN 2014
WHEN tblAssetCustom.Model = 'OptiPlex 7040' THEN 2015
WHEN tblAssetCustom.Model = 'OptiPlex 7050' THEN 2018
WHEN tblAssetCustom.Model LIKE 'Latitude 6540' THEN 2013
etc.
END AS [model year]
...
FROM
...
![](/skins/images/6AE91C23811BC8C2ED7451073DC36BEF/responsive_peak/images/icon_anonymous_message.png)