Query question..

dtinsley

Registered User.
Local time
Today, 15:06
Joined
May 3, 2006
Messages
21
Ok, I'm going to try to explain this the best way I can. I am running a query on a customer database for each day (Monday has a db, Tuesday has a seperate db and so on). If there was no sale in the hour, the database dosent add data for that hour. I am using pivot, based on the hour from the db, in my query. So say no sale was made in hour 5 on Monday, then no column is made for hour 5. However, I need that column to be present, even though there was no entry for that hour. How can this be done? If I need to explain it further, please let me know...
 
Create a separate table with fields identical to the table used to generate your pivot table. Create the "hours" needed in that separate table, then create a Union query with that table and the table the basis for your pivot table, that Union query becomes the data shource for your pivot table. All hours will appear, whether they have data or not.
 

Users who are viewing this thread

Back
Top Bottom