sql query how old is the cpu
Trying to do a query to find out how old are the cpu on device. We do have a way of doing it but it involves manual step which we are trying to move away from.
Basically now we are taking the CPU Model example INTEL I5 8500 2.4gh, 01/04/2017 ( Date CPU Launch), then do the difference with today's date, which work but we always need to update the table with the CPU Model and date cpu was launch.
Here's an example of the query line
Select 'Intel(R) Pentium(R) 4 CPU 2.26GHz','01/01/2002' union
select distinct v_R_System.Name0 as [System Name],
DateDiff(dd,CONVERT(CHAR(10),CONVERT(DATETIME,LEFT(ProcessorReleaseDates.ReleaseDate,10),105),101),getdate())/365.25 AS [Processor Age],
Another way we taught was via the BIOS date but this would not work as if the BIOS get updated it would provide the current bios date.
What would be the best approach to do this.
Your query appears incomplete. It appears to reference some columns, but there are no FROM clause in the query, so where does these columns come from?
Keep in mind that we don't know your tables, so you cannot expect us to fill in the blanks, so to speak.
Sign in to comment