Select Top 10 Percent and 20 Percent between data how can i get?
please provide me the Query?
View Complete Post
I've got a particularly nasty problem that I've been pounding my head against that I hope someone has encountered and can help me with. I have a hospital cube that has a Hospital dimension and a Service Line Dimension (among others). Service
Lines are such things like General Medical, Surgical, Cardiology (there are 16 total). Each member hospital in the Hospital dimension will have Discharges associated with each Service Line. I'm trying to construct a percent of total calculation
for each Hospital and Service Line, so I can look at the percent of total of each Service Line across Hospitals. I'm trying to create a report in SSRS based off this cube. Here's what the dimensions look like:
Hospital Name1 General Medical
Hospital Name2 General Medical
Hospital Name3 General Medical
What I want to do is calculate the percent of total of each hospital's Service Lines, using the total for each Service Line
across hospitals. This will show the contribution of a Service Line at a specific Hospital to the overall total for that Service Line for all Hospitals. Here's the MDX I've been working with that does not work the way I want:
Ok, here's one I'm really struggling with. I have a report that has two dynamic row groups and three dynamic column groups that are nested beneath static column groups. It looks similar to this:
Market Share Discharges
Group1 Column Group2 Column Group3
Row Group1 Row Group2 &
How do I format my numbers to show % symbol in InfoPath?
For instance show 45 as 45%
Can't find any option for that :(
I have to build a new SQL server and would like to pick the best hardware platform for our new server. Our old server was RAID 1. To figure out the best platform for the new server, I would need to know what percent of the time the
sql discs are used for read and what percent for write. I don't know much about SQL other than installing SQL and then adding an application to use SQL. Forgive me if this is an obvious thing to look up. FYI we are currently running
SQL 2005 on our existing server.
I have a piece of sql code that selects the top 10% of a table. See below a sample of the database table
And this is my code
SELECT TOP 10 PERCENT *,
CONVERT(VARCHAR, (CONVERT(FLOAT, Points)/CONVERT(FLOAT, totalpoints))*100) + '%' PercentPoints
FROM (SELECT *,
SUM(points) OVER() totalpoints
Order by Points desc
So what this code does is add up all the points in the points table, (also works out what percentage of the points each user has) and then displays the top 10%, which in this case will give me "John" and "Dave"
So what I need the sql to do is check if any other records in that table have the same number of points ast the last selected record, and to select it to.
So in the above table, the code shoud return "John", "Dave" and "Mark" as Dave and Mark are on the same amount of points. Does anyone know how I can do this?
Sorry if this is not clear
Hi maybe someone out there can help me. I need to calculate percent change in an InfoPath form services form.
Using Excel, the formula would be: (NewSalary - OldSalary)/ABS(OldSalary).
Unfortunately, InfoPath 2007 does not seem to offer an ABS function. I tried using an xpath expression with fn:abs(OldSalary)
but no luck.
Thanks in advance for your help,
I'm wondering if there is a good way to simulate TOP N PERCENT using RANKING functions? NTILE() comes close, but it doesn't simulate it exactly. It almost looks like we need a new PERCENTILE() ranking function.
Thanks in advance.
I am trying to refresh a dev database from production.
Both systems are running SQL Server 2008 64 bit with SP2 on Windows Server 2008.
The backup of prod is done with Red Gate's SQL Backup 6.
The resulting sqb file is copied to the dev server. Because we don’t have a Red Gate license for the dev server, we use their tool sqb2mtf.exe to recreate the .bak
file and then restore using native SQL.
We have done this many times without issue.
However, today the native restore to dev is not working.
It appears to work as the progress info shows 10
I am new to gridview.
I want to make a gridview. Its row when selected should direct me to a specific .aspx page.Each row should direct to a different page.
Should I use querystrings for this? Please suggest.
MSDN Magazine October 2003
This month Aaron Skonnard covers how keys work in XSLT, XSLT match and select attributes, SelectNodes order, finding