dominos coupon code

shopclues coupon code today

amazon coupon codes india

cleartrip coupons for domestic flights

Promo code offers

Tag Archives: PIVOT Query

How to use PIVOT Query in SQL Server ?

TABLE [dbo].[Salary]( [SalaryId] [int] IDENTITY(1,1) NOT NULL, [EmpId] [varchar](50) NULL, [SalaryMonth] [date] NULL, [SalaryAmt] [decimal](18, 0) NULL, //=====================================PIVOT Query============================================= Select pv.* From ( Select * From ( Select EmpId,Month(SalaryMonth)Months,SalaryAmt From Salary ) sal PIVOT (SUM(SalaryAmt)for Months in([1],[2],[3]) )As p )pv

Read More »

How to use a Pivot query in SQL Server ?

TABLE [dbo].[Salary]( [SalaryId] [int] IDENTITY(1,1) NOT NULL, [EmpId] [varchar](50) NULL, [SalaryMonth] [date] NULL, [SalaryAmt] [decimal](18, 0) NULL, //=====================PIVOT Query============================ Select pv.* From ( Select * From ( Select EmpId,Month(SalaryMonth)Months,SalaryAmt From Salary ) sal PIVOT (SUM(SalaryAmt)for Months in([1],[2],[3]) )As p )pv

Read More »