.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Restricting number of rows in a set

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
Hi All, Is it possible to restrict the number of rows which may come in a set in MDX ? WITH SET set1 AS Order ( { Filter ( [DimContract].[Contract Acc].[Contract Acc].MEMBERS , (NOT IsEmpty([Measures].[Consumption])) OR (NOT IsEmpty([Measures].[SampleSize])) ) } ,[Measures].[Consumption] ,ASC ) Say if i have a set like above , then can we restirct the number of contracts which may come in this set ?

View Complete Post

More Related Resource Links

ASP.NET Events and Pageload not firing when Datagrid containing large number of rows of data

Hi All, I have a datagrid in aspx page.Inside of datagrid i am using around 15 controls such as Button,dropdownlist and text box controls.Once the datagrid binds then the events in the aspx page not firing.Issue occured when the number of rowsgreater than 500.The number of rows less then its works fine.If anybody knows the solution please let me know."Platform i am working on ASP.NET1.1"Regards Hareesh

GridView Pager not showing proper number of rows

I have created an out-of-the-box  (default everything) ASP.NET Dynamic Data Entities Web Site using VS2010, C# and the .NET Framework 4. Created an ADO.NET Entity Data Model based off a MS SQL 2008 R2 database and registered that EF data model for my dynamic data. Everything works great except for the one change I would like to make. By default, the GridViewPager.ascx file provides the values 5, 10, 15 and 20 in the dropdown for GridView's "Results per page" option. I would like to change that to 10, 20, 30 and 40 - with 40 being the default selected option. I went to the code behind file and modified it to have the values I am wanting. Those values now show in the dropdown, and work if I select them. Problem: when the page is first rendered only 10 rows will show. How can I change this? Any help would be greatly appreciated.   Thanks

pass number of rows of Gridview to a javascript function

using vb.net/asp.net 2005.I need to pass the number of rows of the Gridview to a javascript function does anyone know how to do this?  thanks

Creating a form with an unknown number of rows

Hi everyone, I'm pretty new at ASP .NET but not to ASP.  I've got a form I need to create where I don't know how many entries will be added.  It has the following format: "Age"             "Duration"      "Period of Duration"     "etc..." Last30Days 1-5 Months ago 6-11 Months ago Age Age Age etc. So the Age column always has the first 3 options and then an unknown number of Age values that can be inserted.  I've created a table that has the first four fields (Last30days, 1-5months, 6-11months, age)  and I was thinking I could just order by those 4 columns for display.  The problem I have is I'm not sure on how to proceed.  Does anyone have any good ideas on how to handle this situation?  Ideally data entry people could use the same form for both entering and displaying the data.  Thanks.

Max number of rows in a table

Hey I'm doing a bit of research on which database to use for a new project. And one of the factors I have to take into consideration, is that we will have some tables with a high amount of records. I originally intended to use mysql (because it's free), but I have found that it has a cap of 4.2 billion rows per table. And it is a possibility that we will exceed that number in a few of our tables. So far, from looking around here, and on the web, I've only be able to find, that is no such cap on tables in mssql, and that table sizes is only limited by available storage. The thing is, 99% of the info I found regarding tablesize limits in mysql, also stated that it was only limited by the storage size (4gb, not all available). I had to look very thouroughly to find that last 1% where someone mentioned the 4.2 bil. upper limit. I hope someone here can confirm that, there is indeed no limit on the number of records in a single table in mssql, no hidden cap, however unlikely to be an issue. I find, that there's a ton reasons to pick mssql over mysql. But this factor will be a big selling point, in convincing the higher-ups that mssql is the better choice for my project.

Drop DownList (Limit the number of rows)

Hi All, I have a dropdown list. This is a bound to a column in Table which has around 200 entires.Now when a user clicks on the drop down list I want him to see not more than 10 rows. The rest he should navigate by using scroll bars.Please advise me on how to achieve this.Rg/-

Restrict number of rows per page



As I deploy reports, based on the no of records in result set, I get a scroller on the right hand side. How can I disable the scroller? I guess I can disable the scroller by restricting the no of rows being displayed.. eg: show 10 records per page. Any idea how do I set no of rows per page?



Performance of a Stored procedure : Optimum number of rows to be handled in a batch


In a stored procedure is there anything called as optimum number of rows that need to be handled in a batch

as In, If there is a SP,

   that picks up data(via union operation) from various objects and puts them into a temp table after which the required data is moved to various tables,The above scenario is handled as a batch run where in 1 million rows are processed in a batch and the next 1 million rows in a next batch,so on and so forth.

   Is there any optimum number of rows that can be processed in the above case?

  When we increase rows processed per batch we have seen improvements in performance of the SP,but not sure when it will start deteriorating.




Report Model--is there a limit on the number of rows?

Is there a limit on the number of rows that a report model will support? Our report model has tables that have millions of rows of data. When we regenerate the model it starting to take hours to regenerate. Is that expected? Is there a limit on the number of rows that can be used with a model?
Kim B.

Count gives me the same answer regardless of the number of rows


I always get a result of zero from the following code sequence even as the row count changes and I just do not see what the error in my syntax is.




supercount As Integer

supercount = 0


Dim sqlkit As String

sqlkit =

Report, Change The Number Of Rows Per Page


I am fairly new to reporting services and recently created a simple tabular report.  There is one table which queries the database and I would like to change the table so there are more than 25 rows of data per page.  How do I do this? 

Also it would be advantageous to know how to set the report to only create a new page for every different item in a column.  For eg if I have various data for each date, I would like to only create a new page when the date changes so that all data for a specific date is on one page etc etc.

Many Thanks

SSAS Excel Drill Thru : Number of Rows Returned don't match up


Hi, I have created an excel report which connects to my cube and have created drill thru action. When I double click on data cell in excel, what I would expect is to give details for that cell. For example, I have a cell in excel that represents 1000 Sales made. When I double click on it, it should only show me thousand rows, however for some reason it gives me more than 1000 rows. So basically the cell counts don't tie with drill thru row counts.....

Any idea on how I can rectify this?

Estimated number of rows does not always match actual number of rows


I am looking at some code that I am writing and keeping an eye out for performance, what i do notice is that on the for left of the query plan by the select/delete, if I place the mouse cursor on the arrow the actual number of rows hardly ever matches the actual number of rows.

Is there anything that I can do to resolve this, I do notice that one needs to update statistics or reorg/rebuild indexes but still the inconsistency exists. Is there a better explanation for this ?


Add Total Problem while grouping and limiting number of rows in a page



I have a report in which first column is CITY and consists of 5 data (5 cities),all other columns are grouped w.r.t CITY, i.e in one city there can be 100s of other column data, last column of report is INCOME. If I right click on [INCOME] field and select ADD TOTAL then it gives citywise total, but I limited only 10 records per page and pagebreak  option is selected at end of the CITY group. When perform the same operation now it gives pagewise sum not the groupwise, please rectify my approach if I am wrong else suggest the solution.

Restricting number of decimals in flat file export



I have an SSIS package which gets its data from a query executed on the database. I need to load this data into a flat file. I am using ragged right export, so my destination has fixed length fields. 

Now I have a float field named "Amount" in the source which has to be restricted to the format 000000000.00. I get Amount in this format by using CAST(Amount AS DECIMAL(11,2)) in the query. But when this data is loaded into the flat file it is loading a number of digits after the decimal like for example instead of 3383626.63 it is displaying 3383626.6299999999. Since my destination file has fixed length field this is resulting in an error.

The error description is this - "[Flat File Destination [1178]] Error: Data conversion failed. The data conversion for column "Amount" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.". 

Please help me with this issue.


FullTextSqlQuery returns the right number of rows, but they have no data!


Hey all,

I'm running my first fulltextsqquery, using the function below - it seems to all execute fine and 24 rows get returned (query below) which sounds about right for all the people on my site. What's weird though is that all the columns in the results are empty string ("" or {}) - they definitely aren't empty in the user's profile - can anyone help me? Preferred email is a custom field and is mapped onto a People:PreferredEmail(Text) property in search admin - anything else i need to do?

 string query = string.Format("SELECT {0},{1} FROM SCOPE() WHERE \"scope\"='People'""PreferredEmail", "FirstName");
 public static ResultTableCollection RunFullTextSqlQuery(string sql, int rowLimit)

rows to fixed number columns


if result is 11 single column rows, need it formatted as 3 rows 4 columns each.  besides brute force, what can I do?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend