Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2009 07:18 PM
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?
Thanks,
Paulo
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
Labels:
- Labels:
-
Report Center
1 REPLY 1
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2009 03:01 PM
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
