Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

SQL report works fine in management studio but gives odd results in report writer.

$
0
0

If I run the following SQL in Management Studio

select datepart (yy,DateTime) 'Year'

,datepart(mm,DateTime) 'Month'

,datepart(dd,DateTime) 'Day'

,COUNT (DISTINCT Client_MAC) AS Total

from dbo.NPM_NV_WL_REPORT_CLIENTS_V

Where datepart(yy,DateTime) = '2013'

AND DATEPART(mm,DateTime) = '07'

Group By datepart(yy,DateTime)

,datepart (mm,DateTime)

,datepart(dd,DateTime)

Order by DATEPART(dd, DateTime) ASC

I get the following output

YearMonthDayTotal
201371738
201372807
201373754
201374140

 

If I create a custom sql report in report writer and paste the above code in then I get the results in the attached file (I tried to inline it but couldn't seem to make it work.)

 

I'm pretty sure I had no wireless clients connecting in 1905 even if I had requested from that year   Any idea idea why it's giving me 1905 in the year column and January 1900 in the month column? The day and totals are still correct.

 

Thanks,

Laura


Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>