Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6780049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:27:36+00:00 2026-05-26T16:27:36+00:00

I have a table: Hourly_Sales that is like this (counting how many buy something

  • 0

I have a table: Hourly_Sales that is like this (counting how many buy something and the ID check):

Store    Time    Year   Month     Count_Service    Count_Service_ID_Check
00001    09:00   2011   8         40               3
00001    10:00   2011   8         50               5
00001    15:00   2011   8         50               5

Now I want to be able to display it like this in Reporting Services:

                       09:00   10:00    11:00    12:00    13:00    14:00    15:00
Store: 00001    
Count_Service          40      50       0        0         0       0        50
Count_Service_ID_Check 3       5        0        0         0       0        5

That is I want to add the hours where there are no transactions, and add a 0.

I have a time table: Dim_TimeTable
That is populated with time and store id:

Store   Time
00001   09:00
00001   10:00
00001   11:00
00001   12:00
00001   13:00
00001   14:00
00001   15:00

Shouldn´t it be enough to do a LEFT JOIN on the Hourly_Sales?

I found a simular question but couldn´t get the answer for my problem for it:
SQL Query to return 24 hour, hourly count even when no values exist?

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:27:36+00:00Added an answer on May 26, 2026 at 4:27 pm

    Yes – use:

    select t.store, t.time, s.Count_Service, s.Count_Service_ID_Check
    from Dim_TimeTable t
    left join Hourly_Sales s on t.store = s.store and t.time = s.time
    

    as your query, then use a matrix to display time across the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table with around 70 000 rows. There is 6000 rows that i
I have table in which I am inserting rows for employee but next time
I have table and this table contain result column with some entries. I just
I have table with 300 000 records (MyISAM). I get record from this table
I have table of data that is sorted as follows: Item | Sample |
I have table with column Percentage varchar(10) Data in that table is Pecentage 2/10
I have table with two columns (varchar from, varchar to). This table represents connections
I have a table of 2 tables in a one to many relationship. I
I have like 10 table inserts and each insert has 1 either 1000 or
I have a table in a SQL Server 2005 Database that is used a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.