Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
Hello,

I had this report working without problems with a custom mantained table, where I had "installed date" of a computer as a DATE field, now I wanted to erase the custom mantained table and use standard Lansweeper tables but I couldn't convert the InstallDate field from text to table, any ideias?

SELECT     YEAR(InstallDate) AS Year, COUNT(*) AS Installations
FROM dbo.tblOperatingsystem
GROUP BY MONTH(InstallDate), YEAR(InstallDate)


Thanks,
Paulo
1 REPLY 1
Anonymous
Not applicable
Well, I had problems with the "+" character that exist in the field "InstallDate". I figured it out doing some trims:

SELECT     TOP (100) PERCENT YEAR(LEFT(InstallDate, 8)) AS Year, MONTH(LEFT(InstallDate, 8)) AS Month, COUNT(*) AS Installations
FROM dbo.tblOperatingsystem
GROUP BY MONTH(LEFT(InstallDate, 8)), YEAR(LEFT(InstallDate, 8))
ORDER BY Year, Month

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now