Dieter/Someone else could you please have a look

Database
Ckp
Enthusiast

Dieter/Someone else could you please have a look

Sorry for reposting.

But I just want a suggestion whether this is possible without case statements as I'll have to write 24*4 cases.

 

 

I have the following table layout :

Store Trans_Dt Time_Interval Sum_Sales Items_Cnt Trans_cnt
193 2016-11-08 12:45:00 AM 77.35          23            4
193 2016-11-08 1:00:00 AM 33.76            18            2
193 2016-11-08 1:15:00 AM 20.81            11            3
193 2016-11-08 1:30:00 AM 71.34            24            2
.
.
194 2016-11-08 12:45:00 AM 87.35            23            4
194 2016-11-08 1:00:00 AM 43.76             18             2
194 2016-11-08 1:15:00 AM 0.81               11             3
194 2016-11-08 1:30:00 AM 1.34               24            2

I want to display it in horizontal layout as :

                          <-------- TIME INTERVAL------------......>
Store Date Param 00:15 00:30 00:45 01:00 01:15 ..................
193 11/8/2016 Sales 0.00 0.00 0.00 77.35 33.76 .....................
193 11/8/2016 Items 0 0 0 23 18 ..........................................
193 11/8/2016 Transactions 0 0 0 4 2......................................
194 11/8/2016 Sales 0.00 0.00 0.00 77.35 33.76 ...........................
194 11/8/2016 Items 0 0 0 23 18 ......................................
194 11/8/2016 Transactions 0 0 0 4 2...................................

 

I have to show 3 rows of Sales, Item, Transactions for each store/date at an incremeting interval of 15 min

2 REPLIES
Senior Apprentice

Re: Dieter/Someone else could you please have a look

What is so bad about 24*4 CASE statements?

It's mainly Cut&Paste&Modify.

 

 

Ckp
Enthusiast

Re: Dieter/Someone else could you please have a look

Yes, no issues with it. 

I was just wondering if there's any simple alternative.