Omgili - forum search, search forums  
  

Discussions about subset of rows

Displaying 1 - 10 out of 2,323 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
In an (m by n) array stored as double *d (column major), what is the fastest way of selecting a range of rows and or columns: double *filter(double *mat, int m, int n, int rows[], int cols[]); invoked as: double *B; int rows[]= {1,3,5}; int cols[]={2,...
Started by on , 3 posts by 3 people.  
Of items of rows and n should be the number of items in cols) and not the dimension of the source that those will be valid) and b) if you don't know the size of rows and columns they are useless memory for an m x n array For each i in 0....
This may seem as a typical plyr problem, but I have something different in mind. Here's the function that I want to optimize (skip the for loop). # dummy data set.seed(1985) lst <- list(a=1:10, b=11:15, c=16:20) m <- matrix(round(runif(200, 1, 7...
Started by on , 3 posts by 3 people.  
Function on each part, by row subs[[i]] <- apply(dt[ , lst[[i]]], 1, fun) } with subs <- llply(lst.
I have a QTableView using a QSqlTableModel . In the underlying database (postgresql) table there is a timestamp column. How can I select all rows in the selection model where the underlying timestamp column is NULL? Pointers in the right direction would...
Started by on , 3 posts by 3 people.  
To access the model's data, you can use QSqlQueryModel.
To do so, loop through the entire model and determine which rows have NULL as the timestamp.
You'll need to determine which rows to select.
Ask your Facebook Friends
I've got a production DB with, say, ten million rows. I'd like to extract the 10,000 or so rows from the past hour off of production and copy them to my local box. How do I do that? Let's say the query is: SELECT * FROM mytable WHERE date > '2009-0...
Started by on , 4 posts by 4 people.  
Questions/414849/whats-the-best-way-to-copy-a-subset-of-a-tables-rows-from-one-database-to-anoth> "%i rows retrieved" % old_cursor.rowcount new_cursor.execute("""BEGIN""") placeholders = [] namesandvalues = {} for name in names....
I'm working on returning a recordset from SQL Server 2008 to do some pagination. I'm only returning 15 records at a time, but I need to have the total number of matches along with the subset of records. I've used two different queries with mixed results...
Started by on , 3 posts by 3 people.  
990 which avoided having to count all rows row count, but using the query plan to give me an estimated row count, a bit like the first item was then to deliver whatever....
The estimated row count, like rows 900-915 of approx.
We're inherting a project at work from another office that has closed down. The production database is around 150GB and we're shying away from copying this to 4 dev machines to work from. Are there any scripts, utilities or suggestions on how we can go...
Started by on , 3 posts by 3 people.  
Rinse and repeat% of the database thats left behind....
"Customers") and recursively fetch any dependent rows from dependent tables.
Relationships between tables are, and how you find all the dependencies of a given row in a given table (e.g.
I want to left join TableA to TableB where a certain condition in tableA is true So I do this type of SQL query Select * from TableA Left Join TableB on TableA.fld1 = TableB.fld2 where TableA.fld3 = True This works OK. Now however I want to do the Join...
Started by on , 4 posts by 4 people.  
Try this: Select * from TableA and TableB.fld4 = False where TableA.fld... .
When you have a where clause that filters rows on the "right" side of a left join query, you ultimately exclude rows.
You should put the condition in the join clause.
Are the following queries effective in MySQL: SELECT * FROM table WHERE field & number = number; # to find values with superset of number's bits SELECT * FROM table WHERE field | number = number; # to find values with subset of number's bits ...if an ...
Started by on , 4 posts by 4 people.  
Amount of rows, and that the "bitwised" criteria remain selective enough) a possible optimization is achieved when avoiding a bitwise operation on every single row, by rewriting the query this need to be evaluated with different use cases....
I have an application that (unfortunately) contains a lot of its business logic is stored procedures. Some of these return masses of data. Occassionally the code will need a small amount of the data returned from the stored procedure. To get a single ...
Started by on , 4 posts by 4 people.  
You have to create a new stored proc (to return what you want) or modify the current one (to branch) if you want to do this: project politics can not change real life Edit: I didn't tell... .
A stored procedure is a single executable entity.
No, you can't.
I guess there will be a very simple answer to this. But here goes. Data in long format. like this d <- data.frame(cbind(numbers = rnorm(10), year = rep(c(2008, 2009), 5), name = c("john", "David", "Tom", "Kristin", "Lisa","Eve","David","Tom","Kristin...
Started by on , 5 posts by 4 people.  
If there is only one record per year, just count up the number for everyone who appeared twice: subset....
In rows: library(reshape) cast(d, name ~ year, value = "numbers") You could then use complete.cases to extract the rows of interest.
Page: 1   2   3   4   5   6   7   8   9   10  
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost