Display exactly 2 digits after decimal without Rounding on SQL Server

let say, we had a value 7.35642132 on sql query return, then we want to display it only exactly 2 digits after decimal without Rounding, here is the way :

to get only two digits after decimal for a value 7.35642132
Select LTRIM(RTRIM(STR(7.35642132,10,2)))

the results is 7.35

Enable content expiration under IIS 7

In IIS6, it was with the website properties –> HTTP Headers. Here in IIS7, you can do this on the “HTTP Response Headers” feature on the website.

  • Select the website in the Connections pane.
  • Double click on the “HTTP Response Headers” feature in the features pane
  • In the action pane, click on the “Set Common Headers…”

image

  • You will see the following popup

image

Now, you know what to select. You should enable the HTTP Keep-Alive on this popup only.

 

Source : http://blogs.msdn.com/b/rakkimk/archive/2007/07/10/iis7-how-to-enable-content-expiration.aspx

Excel 2003 Add-in: XML Tools Add-in

Instructions

To install the add-in, complete the following steps:

    1. Start Excel.
    2. On the Tools menu, click Add-Ins.
    3. Click the Browse button and navigate to the .xla file.
    4. Select it and then click OK.
    5. Click Yes to any file copy or overwrite prompts.

 

How to install Add-in in MS Excel 2007

1. Click the ball office logo at the top-left of the program
2. Click button “Excel Option”

3. Select item “Add-Ins”
4. Select “Excel Add-Ins” in Manage list box and click button “Go…”

5. Tick the add-ins that you want and click button “OK”

Convert a Excel workbook to an xml file

This post is a bit off topic for this blog but I’ll post it anyway as a reminder for myself and hopefully to help others who want to do the same. At a client someone had to convert a very simple, plain, flat text excel 2007 workbook to an xml file format.

I have made an example to let you see how to do this. Below you see the workbook that has to be converted to xml.

exc_workbook1

I thought that just saving the file with “save as” to xml format would do it but I thought wrong. I got an error that there were no XML mappings found in the workbook. For Excel 2007 you need a add-in that is called OfficeExcel2003XMLToolsAddin.exe and which can be downloaded here. On the download page you can also read how to install and open the add-in in Excel 2007.

Read more: http://www.information-worker.nl/2010/04/19/howto-convert-a-excel-workbook-to-an-xml-file