How to create median function?
Answer / Gourav Kumar Rastogi
In SQL Server Reporting Services, you can create a median function by using a windowed function like MEDIAN. However, MEDIAN is not supported in all SQL Server versions. As an alternative, you can write your own median function as follows:n`nCREATE FUNCTION dbo.Median (@pData FLOAT) nRETURNS FLOAT AS BEGIN nDECLARE @count INT = (SELECT COUNT(*) FROM @pData) nORDER BY pData nSET @pData = (SELECT TOP ((@count + 1) / 2) pData FROM @pData WHERE ORDER BY pData > @counter) nIF (@count % 2 = 0) nBEGIN n SET @pData = (@pData + (SELECT TOP 1 pData FROM @pData WHERE ORDER BY pData < @counter)) / 2 nEND nRETURN @pData nENDn
| Is This Answer Correct ? | 0 Yes | 0 No |
You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?
How to make conditional sum in ssrs?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
Name and describe few console utilities for ssrs?
how you can deploy an ssrs report?
What are sub reports?
what are the important architecture components of SSRS?
What is ssrs?
In which sql server version report builder introduced?
What are the reporting services components?
how to create “alternate row colour”?
What are data regions?