I am stuck in unpivoting. I have a table like #temp below. Using sql server 2008 r2
Select LoanNumber = 2000424385
,[AmntType1] = 120.32
,[AmntType2] = 131.52
,[AmntType3] = 142.36
into #temp
select * from #temp
Above table has only one row and i want three rows as below
LoanNumber Amount AmountType
2000424385 120.32 AmntType1
2000424385 131.52 AmntType2
2000424385 120.32 AmntType1