cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MHScripts
Engaged Sweeper II
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!

1 REPLY 1
RCorbeil
Honored Sweeper II
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
...