Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Want to create Weekly report from Specific table

$
0
0

I have one views in SQL DB (dbo.SystemValidation) which is generating some counts everyday like below (Picture 1). And this count is changing everyday because of Data changes in the background. Now I want to generate weekly Report based on TimeStamp for example as below on 2nd Picture

from dbo.SystemValidation
SVnumber    Count
SV0300  1317
SV0303  271
SV0304  7
SV0305  0
SV0306  0
SV0307  165
SV0308  1275

Output Required

timeStamp       SV0300  SV0303  SV0304  SV0305  SV0306  SV0307  SV0308
12/9/2015 14:06  1317  268        7       0      0    165      1275
12/16/2015 14:06 1320  200        0      7      6    150      100
12/23/2015 14:06                            
12/30/2015 14:06                            
1/6/2016 14:06                          
1/13/2016 14:06                         
1/20/2016 14:06                         

I have one views in SQL DB (dbo.SystemValidation) which is generating some counts everyday like below (Picture 1). And this count is changing everyday because of Data changes in the background. Now I want to generate weekly Report based on TimeStamp for example as below on 2nd Picture

from dbo.SystemValidation
SVnumber    Count
SV0300  1317
SV0303  271
SV0304  7
SV0305  0
SV0306  0
SV0307  165
SV0308  1275

Output Required

timeStamp       SV0300  SV0303  SV0304  SV0305  SV0306  SV0307  SV0308
12/9/201514:061317268700165127512/16/201514:06132020007615010012/23/201514:0612/30/201514:061/6/201614:061/13/201614:061/20/201614:06

I have one views in SQL DB (dbo.SystemValidation) which is generating some counts everyday like below (Picture 1). And this count is changing everyday because of Data changes in the background. Now I want to generate weekly Report based on TimeStamp for example as below on 2nd Picture

from dbo.SystemValidation
SVnumber Count
SV0300  1317
SV0303 271
SV0304 7
SV0305 0
SV0306 0
SV0307 165
SV0308 1275

Output Required

timeStamp       SV0300  SV0303  SV0304  SV0305  SV0306  SV0307  SV0308
12/9/201514:061317268700165127512/16/201514:06132020007615010012/23/201514:0612/30/201514:061/6/201614:061/13/201614:061/20/201614:06

Viewing all articles
Browse latest Browse all 4729

Trending Articles



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