Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find the peak hour
Message
From
05/08/2014 13:17:55
 
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01604117
Message ID:
01605182
Views:
41
>>>http://social.technet.microsoft.com/wiki/contents/articles/25654.t-sql-find-the-peak-hour.aspx
>>
>>Goodness! I'm famous.
>>
>>:)
>>
>>Thank you for the heads up. What does he mean when he speaks about the "correctly designed table"? Is he suggesting there might be a better table structure for my data? He doesn't really give much help there.
>
>By correctly designed table it means one row for each date/time instead of 96 columns.
>
>BTW, who is he? I wrote that article.

OOPS! Sorry. I looked at it too quickly and missed your name on it. My apologies.

Actually columns P1-P96 are only half of the record. The table also contains P101-P196 which represents the opposite direction. I did it this way to keep the count together and avoid bloat in the number of records in the table. It also enables me to save the location, date, contractor, lat/long, etc only once instead of 200 times for each count. This seemed more efficient to me. You can see the final product at http://gismaps.pagnet.org/trafficcounts.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform