Search Results

Search found 7311 results on 293 pages for 'rows'.

Page 7/293 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Multiple rows with a single INSERT in SQLServer 2008

    - by Todd
    I am testing the speed of inserting multiple rows with a single INSERT statement. For example: INSERT INTO [MyTable] VALUES (5, 'dog'), (6, 'cat'), (3, 'fish) This is very fast until I pass 50 rows on a single statement, then the speed drops significantly. Inserting 10000 rows with batches of 50 take 0.9 seconds. Inserting 10000 rows with batches of 51 take 5.7 seconds. My question has two parts: Why is there such a hard performance drop at 50? Can I rely on this behavior and code my application to never send batches larger than 50? My tests were done in c++ and ADO.

    Read the article

  • Removing rows in asp.net

    - by user279521
    I am attempting to remove rows on my asp.net page using the following code: try { Table t = (Table)Page.FindControl("Panel1").FindControl("tbl"); foreach (TableRow tr in t.Rows) { t.Rows.Remove(tr); } } catch (Exception e) { lblErrorMessage.Text = "Error - RemoveDynControls - " + e.Message; } however, I am getting an error on the (when the code loops the second time around) "Collection was modified; enumeration operation may not execute." Any ideas regarding what is causing the error message?

    Read the article

  • Reporting Services is displaying extra rows for minimised row groups

    - by Graphain
    Hi, I have a fairly basic SQL Server Reporting Services report that is using nested row groups. Each sub-group depends on expanding its parent to be visible which is all pretty standard. The layout is something like this: { Company { { Car SUM(Price) { { { Part Price My desired result when expanded is something like this (which I get fine): - SuperCarCompany - SuperCar 20 Door 20 - SuperCar2 70 Door 30 Window 40 - OtherCarCompany - SuperCar2 50 /* Same SuperCar2 */ Door 50 - MoreCarCompany - BestCarEver 535 Engine 500 Door 30 Window 5 And when opened initially something like this: + SuperCarCompany + OtherCarCompany + MoreCarCompany However, I'm getting this: + SuperCarCompany + SuperCar2 70 (i.e. sum of all SuperCar2) + OtherCarCompany + SuperCar 20 + MoreCarCompany + BestCarEver 535 and I can even expand these superfluous rows like this: + SuperCarCompany - SuperCar2 70 (i.e. sum of all SuperCar2) Door 30 (i.e. first child of any SuperCar2) The superflous rows dissapear immediately when I expand the expected row above it (i.e. I'd need to expand all expected rows to get rid of all superflous rows). Any idea on the cause?

    Read the article

  • Create Sum of calculated rows in Microsoft Reporting Services

    - by kd7iwp
    This seems like it should be simple but I can't find anything yet. In Reporting Services I have a table with up to 6 rows that all have calculated values and dynamic visibility. I would like to sum these rows. Basically I have a number of invoice items and want to make a total. I can't change anything on the DB side since my stored procedures are used elsewhere in the system. Each row pulls data from a different dataset as well, so I can't do a sum of the dataset. Can I sum all the rows with a table footer? Similarly to totaling a number of rows in Excel? It seems very redundant to put my visibility expression from each row into my footer row to calculate the sum.

    Read the article

  • R counting the occurance of similar rows of data frame

    - by Matt
    I have data in the following format called DF (this is just a made up simplified sample): eval.num, eval.count, fitness, fitness.mean, green.h.0, green.v.0, offset.0 random 1 1 1500 1500 100 120 40 232342 2 2 1000 1250 100 120 40 11843 3 3 1250 1250 100 120 40 981340234 4 4 1000 1187.5 100 120 40 4363453 5 1 2000 2000 200 100 40 345902 6 1 3000 3000 150 90 10 943 7 1 2000 2000 90 90 100 9304358 8 2 1800 1900 90 90 100 284333 However, the eval.count column is incorrect and I need to fix it. It should report the number of rows with the same values for (green.h.0, green.v.0, and offset.0) by only looking at the previous rows. The example above uses the expected values, but assume they are incorrect. How can I add a new column (say "count") which will count all previous rows which have the same values of the specified variables? I have gotten help on a similar problem of just selecting all rows with the same values for specified columns, so I supposed I could just write a loop around that, but it seems inefficient to me.

    Read the article

  • Navigating cursor rows in SQLite

    - by Alan Harris-Reid
    Hi there, I am trying to understand how the following builtin functions work when sequentially processing cursor rows. The descriptions come from the Python 3.1 manual (using SQLite3) Cursor.fetchone() Fetches the next row of a query result set, returning a single sequence. Cursor.fetchmany() Fetches the next set of rows of a query result, returning a list. Cursor.fetchall() Fetches all (remaining) rows of a query result, returning a list. So if I have a loop in which I am processing one row at a time using cursor.fetchone(), and some later code requires that I return to the first row, or fetch all rows using fetchall(), how do I do it? The concept is a bit strange to me, especially coming from a Foxpro background which has the concept of a record pointer which can be moved to the 1st or last row in a cursor (go top/bottom), or go to the nth row (go n) Any help would be appreciated. Alan

    Read the article

  • How to select top n rows from a datatable/dataview in asp.net

    - by skamale
    How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way. public DataTable SelectTopDataRow(DataTable dt, int count) { DataTable dtn = dt.Clone(); for (int i = 0; i < count; i++) { dtn.ImportRow(dt.Rows[i]); } return dtn; }

    Read the article

  • Excel 2010 Move data from multiple columns/rows to single row

    - by frustrated529
    So frustrating! I get data sent to me and it looks like this: a 1 a 2 2 a 3 3 b 1 b 2 2 b 3 3 b 4 4 b 5 5 b 6 6 and I need it to look like this: a 1 2 2 3 3 b 1 2 2 3 3 4 4 5 5 6 6 I have about 30 columns that need to move to the top value in their group, then removing the duplicates (to which there are about 33 rows of duplicates, trying to get it down to about 8 rows). I have been searching forums for several days and trying bits and pieces of code. I am having such a tough time with VBA!!!! Same illustration, but graphically:     →

    Read the article

  • R counting the occurrences of similar rows of data frame

    - by Matt
    I have data in the following format called DF (this is just a made up simplified sample): eval.num, eval.count, fitness, fitness.mean, green.h.0, green.v.0, offset.0 random 1 1 1500 1500 100 120 40 232342 2 2 1000 1250 100 120 40 11843 3 3 1250 1250 100 120 40 981340234 4 4 1000 1187.5 100 120 40 4363453 5 1 2000 2000 200 100 40 345902 6 1 3000 3000 150 90 10 943 7 1 2000 2000 90 90 100 9304358 8 2 1800 1900 90 90 100 284333 However, the eval.count column is incorrect and I need to fix it. It should report the number of rows with the same values for (green.h.0, green.v.0, and offset.0) by only looking at the previous rows. The example above uses the expected values, but assume they are incorrect. How can I add a new column (say "count") which will count all previous rows which have the same values of the specified variables? I have gotten help on a similar problem of just selecting all rows with the same values for specified columns, so I supposed I could just write a loop around that, but it seems inefficient to me.

    Read the article

  • Alternate three and three rows in a table with jQuery

    - by Frode Lillerud
    I want to set the alternate background color for rows in a table - but the twist is that I don't want every other row to be colored, I want to treat them in blocks of three rows. So for a table with eight rows I want the first three to be white, then the next three to have a background color, and the last two are back to white again. How can I do this using jQuery?

    Read the article

  • jQuery - count number of rows in a table

    - by danjan
    How do I count the number of tr elements within a table using jquery. Sorry, I sense this might be basic but i've been banging my head against it. I know there is a similar thread, but I just want the total rows. http://stackoverflow.com/questions/613024/count-number-of-table-rows-between-two-specific-rows-with-jquery

    Read the article

  • Join a single row in one table to n random rows in another

    - by Einar Egilsson
    Is it possible to make a join in SQL server that joins each row from table A to n random rows in another? For example, say I have a Customer table, a Product table and an Order table. I want to join each customer to 5 random products and insert these rows into the order table. (And each customer should be joined to 5 random rows of his own, I don't want all customers joining to the same 5 rows). Is this possible? I'm using SQL Server 2005 and it's fine if the solution is specific to that. This is a weird requirement but I'm basically making a small data generator to generate some random data.

    Read the article

  • Querying datatable to get rows with a certain value in the first column

    - by user1776590
    I am currently using the code below and am wondering if it would be possible to query based on an entry value. At the moment it returns the number of rows that have been defined. var q = sqlData.AsEnumerable().Take(2); This data comes in from a database and is imputed into the table but at the moment it only returns database data into the datatable and allows me to select the first two rows and I was wondering if I can query the data table so that I can get the rows that I require based on an index in the actual table itself (e.g. in the table I find five rows and query this information out).

    Read the article

  • DB2: Won't allow parameterize fetch first X rows only

    - by Guy Roth
    Although in Oracle DB its is allowed to parametrize the number of rows that the query can fetch by adding to the query: select ... from ... where ... and rownum <= @MaximumRecords I can't add similar condition to acuivalent query running in DB2: It is allowed to add: select ... from ... where ... fetch first 500 rows only (where there is fixed number of rows) but not: select ... from ... where ... fetch first :1 rows only (:1 == @MaximumRecords) Is someone aware of a solution/work-around to this problem?

    Read the article

  • GridView in UpdatePanel adds extra rows when sorting another grid

    - by chopps
    Hey Everyone, I'm a seeing some weird behavior that i have never seen before. I have two grid in separate UpdatePanels. I can page and sort each without any problems. Each grid is set for 10 per page. If the first grid (13 records) is paged to the second page and then i go down to the second grid (14 records) and page to the next page and the first grid adds a bunch of empty rows to the grid so it is full to show 10. There is no data in the rows...just empty rows. Each grid does this on paging and sorting. Ive stepped through the code and the the loading of the other grids never happens so it tells my AJAX is doing something to add the 'phantom' rows to the grid. Any ideas why or ways to debug this?

    Read the article

  • Filter rows from Cursor so they don't show up in ListView

    - by Richard
    I have a Cursor that returns rows I use with a SimpleCursorAdapter to populate a ListView. I would like to filter some of the rows so they don't get displayed in my ListView. I use the data from the rows elsewhere in my Activity so I don't want to change my SQL to filter them with a WHERE clause. What is the best way to keep a row from being displaying in my ListView? Ideally I would check a column in my row and then only add rows to the ListView that satisfy a condition.

    Read the article

  • Deleting Multiple rows from a TableView

    - by Sid
    hi Frnz, i want to delete multiple rows from a table view based on users selection.obviously i cant use didSelectRowAtIndexPath method coz it will be called for every row selected. i want to allow user to select multiple rows for deletion and then delete them in one go...Is it possible if yes then how to go about it.Also i am using a single view based project and i want the header of table view changed to "Delete" on the same view when the user want to delete the rows from the view. Thx

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >