Position of a record within an index - database

If I have an index within a table, is there a way to locate the relative position of a record?
example, there are 5 records displayed:
1
4
5
6
7
then on locating value=5, is there a way to know 5 is the 3rd record in this index?
then what if there is a filter applied - my guess is when there is a filter applied, definitely have to loop through every record to find the position... so maybe there's still a chance to know if it is simply Index deployed (without filter).
thanks.
edited Purpose: to show a progress bar on position of this record relative to first and last record. thanks.

Related

BlueSky, remove missing row

I'd like to remove a missing row of data. My data set looks like this (assume they all line up, and are imported from excel)
Canada 1 5 3
Afghanistan 3 7 2
Brazil 2 4 6
How do I remove the line for Afghanistan?
I'm using BlueSky 10.0.0, R package version 8, on windows 10. I want to remove the row, using BlueSky menu.
Thanks
I read a guide to blueSky, couldn't find how to do this. I searched stackoverflow, couldn't find how to do this. I might not know the right terms to use to search.
In the grid view of your data set, just choose the row with left mouse click
Then, with right mouse click you will get a menu to insert or delete a data row among others.

MS Access Combobox Row Source Issues

Have not been able to find an answer to this issue...
This is my Value list Row Source Homeroom;Period 2;Period 3;Period 4;Period 5;Period 6;Period 7;Advisory
When I open the form...Only every other (starting at second value) is shown.
For example:
Period 2
Period 4
Period 6
Advisory
I figured it out...Number of Columns and width of Columns were fighting me...

MS Access - Color cells in a query that has the same numbers in a specific column

In my database i have columns with information that are match togheter with a column named MsgNumber this column looks like this:
Where if it´s 1 1 the two rows have some coherent information. 2 and 3 3 3 and 4 4 4 4 and so forh all the rows are aligned that way. My goal is to get the query to order the cells by color as show in the next pictur:
I tried with condition formation but then i needed to do a seperate "report" i need to edit the rows directly in the query. (doing it manually is not an option). Can it be done? Thanks

Remove duplicate values based on timestamp

I would need your help with and SQL query that has to remove duplicate entries from a table, mostly using the datestamp column as a criteria in two passes.
Microsoft SQL DBMS is in question.
Here is a little more details:
Terminology: Module is basically a group of single machine workplaces onto which users operate.
Table:
ModNam column is fixed, there are 15 modules from M A01 to M A15, then goes the B row M B01 ... M B15 and so on until row F.
Pos column is irrelevant at the moment.
MdCod column represents a code of the machine being added to the position in the certain module. It can be replaced by another machine at any given time.
I have one query that will be inserting data into this table by copying entries from another table, every time a new machine is added to one of the positions.
Tricky part for me is a second query that should be comparing records in two phases and if:
1) Inside same module (first pass of the query represented with red color in the example pic attached):
ModNam value is the same, MdCod matches between the entries then the most recent datestamp decides the single one to stay and others duplicates get deleted
2) Inside other module (second pass of the query represented with purple color in the example pic attached):
ModNam values are different and MdCod matches between the entries then the most recent datestamp decides the single one to stay and others duplicates get deleted.
Please help and advise.
Example pic (updated):
Thank you all in advance.

Paging with a data set that can be changing?

I'm sure there is something out there about this topic but I just can't figure out how to word a search for it.
I have a table of records that gets loaded into a paging grid in the UI. The user has the ability to update/modify these records..also multiple users can use the system at once all hitting the same data. I have a filter on the paging grid allowing the user to see only X type of records.
When the user first enters with filter X selected they see items 1-25 on page 1 of 2. They page to the second page where the items should be 26-50..but before they paged lets say 25 records on the first page had their type changed by another user, now they don't appear when selecting that filter. So now we have 25 less items to page through which means items that were 26-50 before are now items 1-25 and what was page 2 is now page 1 and there is no page 2...
You can probably see the issue I'm getting into, I'm passing an offset to the query to get the next page of results..but now that offset is so high it returns a blank page of records confusing the user and our record processing.
There isn't really an easy solution to this problem. Even GMail/Google doesn't show the exact number of messages/pages found when searching something.
The first thing you can do (if you use a DataGrid/CellTable) is set the boolean exact as false when you call updateRowCount, and give it your current number of records instead of your total number of records. This will make the pager display "1 - 25 of over 25" instead of "1 - 25 of 50".
The next possibility is to update the row count regularly (using RPC polling to check for new/deleted records - or using server push techniques, see GWTEventService and ServerPushFAQ).
You can also check if your request returns items or not, and cancel the call/update the row count if it doesn't.

Resources