Convert column into rows in SQL 2005 using Pivot/Unpivot

Filed in SQL Leave a comment

Before

ID

Quantity 1

Quantity 2

Quantity 3

145

5

14

3

146

12

13

14

148

44

2323

NULL

SELECT *

FROM

(SELECT RFQDetID, Quantity1, Quantity2, Quantity3

FROM RFQDetail where RFQID = 230) p

UNPIVOT

(Value FOR Old_Col_Header IN

(Quantity1, Quantity2, Quantity3)

)AS unpvt;

GO

After applying unpivot data look like

ID

Value

Old_Col_Header

145

5

Quantity1

145

14

Quantity2

145

3

Quantity3

146

12

Quantity1

146

13

Quantity2

146

14

Quantity3

148

44

Quantity1

148

2323

Quantity2


Restoring Windows Live mail to fresh installation

Filed in OS 1 Comment

If you are using Windows Live mail for retrieving your email sometime it happens that you lost you installation in this way you lost your Windows Live mail too so in order to retrieve it back do the below steps.

Before formating your previous installation you have to take backup of the below folder.

C:\Documents and Settings\[USERName]\Local Settings\Application Data\Microsoft\Windows Live Mail

After the fresh installation, install Windows Live and open the Windows Live Mail once so that the folder got created then replace your backed up folder with the newly created one on the same path.

TOP