Showing posts with label displaying. Show all posts
Showing posts with label displaying. Show all posts

Monday, March 19, 2012

How to round the measures (fields in fact table) to a nearest integer.

How to round the measures (fields in fact table) to a nearest integer.

These measures were displaying the decimal places and I want to get rid of decimals by rounding.

How to implement rounding for these measures.

Thanks In Advance

Anil Pasupula

Just use the format string for the measure to format it. e.g. "#,0". It will round it correctly.|||Thanks for your solution.

Wednesday, March 7, 2012

How to retrieve last updated record

I have some set of records in my table.

The same set of records will be updated often. Now I have a column as "lastupdated"

While i am displaying the records in a datagrid, The LAST UPDATED record should only be displayed.

Means, the recently updated records should be displayed in datagrid.

Pls give me the sql code / i am also in need of a Stored procedure for this.

I am working in SQL 2005

SELECT TOP (1) * FROM yourTable ORDER BY lastupdated DESC

You can wrap it into a Stored Procedure:

CREATE PROCEDURE yourSP

AS

SELECT TOP (1) * FROM yourTable ORDER BY lastupdated DESC

|||

Thankyou Thankyou Thankyou,

Thanks a lot for your reply.Cool