Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. If the answer is helpful, please click " Accept Answer" and upvote it. ![]() ,'umc_over_' + CONVERT(nvarchar(30), day_date, 126) umc_over_nameįor umc_sh_name in(,)) pįor umc_vac_name in(,)) p1įor umc_bank_name in(,)) p2įor umc_over_name in(,)) p3 In TSQL, I took a lot of time and could perform as below. ,'umc_bank_' +CONVERT(nvarchar(30), day_date, 126) umc_bank_name You could check whether there is a better way using Excel, SSIS, SSRS or other tool. ,'umc_sh_' + CONVERT(nvarchar(30), day_date, 126) umc_sh_name 30, Analyze (AN), All-Source Analysis (ASA), All-Source Analyst (AN-ASA-001), Technical, C012, Data Analysis, S0288, Skill in using multiple analytic tools. Select emp_id,day_date,umc_sh,umc_vac,umc_bank,umc_over You could check whether it is a little helpful to you. ![]() You could check whether there is a better way using Excel, SSIS, SSRS or other tool. I need a pivot table similar to this: (Is it posible?)Īctually it is a little difficulty to write a query to get your expected output using TSQL. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON A pivot table is a tool to summarize data by. (6, 2) NOT NULL CONSTRAINT DEFAULT ((0)),ĬONSTRAINT PRIMARY KEY CLUSTERED Lets turn to pivot tables, a different type of filtering which will help us explore our data more deeply. Here is my table difinition CREATE TABLE. ![]() How do i create a pivot table? Day (day_date) as columns? This is the data : for each employee there are 14 Days)
0 Comments
Leave a Reply. |