473,804 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to keep certain units together

29 New Member
Hello, so I'm not sure how to go about this.

My table is below: Each piece of equipment we have has an equipmentID, and can have multiple Compartments (parts in the machine), which are dueIn (due to be inspected) in a certain number of hours of use.

So, I want to go through the list, find the lowest "dueIn" reading for a piece of equipment with the Compartment "Engine", list it first, then all of the other compartments belonging to that equipment. Then find the next lowest engine compartment, and list all of the other parts from that piece of equipment and so on.

So all of the compartments in a piece of equipment need to stay together in a group, and I need those groups sorted by the "DueIn" value for that piece of equipments engine.

Sorry if I made that too complicated, if that doesn't make sense let me know and I'll try to re clarify.

Expand|Select|Wrap|Line Numbers
  1. equipmentID lastEntry reading code    dueIn    Compartment OD
  2. 28178    1/4/2010    47905    C    95    Transmission    17524
  3. 28191    1/12/2010    35758    C    -1444    Engine    17525
  4. 28206    1/11/2010    41182    C    -714    Engine    17526
  5. 28508    1/10/2010    26414    C    -416    Engine    17527
  6. 30714    1/9/2010    11956    C    71    Transmission    17528
  7. 30714    1/9/2010    11956    C    32    Differential    17529
  8. 31070    1/9/2010    17000    C    -480    Engine    17530
  9. 31070    1/9/2010    17000    C    -586    Differential    17531
  10. 31070    1/9/2010    17000    S    -480    Hydraulics    17532
  11. 31070    1/9/2010    17000    S    -589    Coolant    17533
  12. 31192    1/12/2010    13294    C    62    Engine    17534
  13. 31192    1/12/2010    13294    S    62    Hydraulics    17535
  14. 31192    1/12/2010    13294    S    62    Coolant    17536
  15. 31362    1/12/2010    9693    C    72    Engine    17537
  16. 31362    1/12/2010    9693    S    72    Coolant    17538
  17. 31384    10/19/2009    61915    C    -1915    Transmission    17539
  18. 31384    10/19/2009    61915    C    -1915    Differential    17540
  19. 31384    10/19/2009    61915    C    -1915    Rear Differential    17541
  20. 31384    10/19/2009    61915    S    -31915    Coolant    17542
  21. 31509    1/11/2010    983    C    17    Transmission    17543
  22. 31509    1/11/2010    983    S    58    Differential    17544
  23. 31509    1/11/2010    983    S    58    Rear Differential    17545
I could do something in VBA if needed, but I kind of wanted to keep it all as one query if possible.
Jan 14 '10 #1
0 1470

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2208
by: pablo | last post by:
Dear NG'ers, I want to keep my images at a certain position that should change when the text is enlarged or shrunk with the button on the toolbar? What event is triggered when resizing text in the above way? tia pablo k
7
5127
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting normal functions in header files results in multiple definition errors even when include guards are used. -- STH Hatton's Law: "There is only One inviolable Law" KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com Mozilla:...
5
2057
by: paulp | last post by:
Greetings, I'm working on a CGI program that will run under MS IIS 5.0 and will browse folders on three other machines, building HTML pages that will provide links to these folders. Essentially, the CGI will connect to each machine in turn, doing the FindFirst/FindNext process based on the current criteria. It will select certain files/folders, and build an HTML page as it goes.
2
3948
by: John M | last post by:
Hi For reporting grades and comments about students, I use one subreport per subject. This includes a number of text boxes, some containing numerical data, but one containing a textual report. Depending on how much is written, sometime there are three on a page, sometimes two etc. What I cannot seem to do is to get it to 'not start a report for a subject unless it can fit it on a page'. The keep together option seem to have no effect...
6
8645
by: Steve Jorgensen | last post by:
I tried to fix a problem for a client today in which report sections and even individual text controls in some of their reports are being split across page boundaries. Of course, I was thinking the answer was just going to be setting some Keep Together properties to Yes. Alas, it was not to be. It turns out that the report in question is actually a combination of 2 other reports based on different tables. The reports should follow one...
0
1594
by: Johnny M | last post by:
I have a main report that consists of 15 subreports. When a main detail item is produced only selected subreports are produced depending on a certain control. The subreports generally occupy only 3 columar inches of space and I want to keep the entire subreport on a page. The keep together property on the detail section of each subreport is set to Yes but the subreports still break across a page even if it is the last of three subreports...
4
17893
by: ckirchho | last post by:
Hallo, In a form I have several text or checkbox inputs with their appropriate labels. I'd like to keep label and input together, so I connect them with a &nbsp;, like: <input type="checkbox" name="h" value="1" id="chk"/>&nbsp;<label for="chk">Schreibweisentolerant</label> Apparently this doesn't work in Firefox 2. It works in IExplorer and Opera. As well I tried:
1
3152
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important information is). I've got the product name at the top, left aligned and typically as a two lined header, and I'd like to add a small logo to the right of that, either right beside it, or in the far right corner. could anyone help me with how to set...
46
3097
by: dude88888 | last post by:
Hello I have one query where i get the total number of units for an entire fund say fund 89 has 1000 total units Then i need to find out how much of the total fund each user has say user 6 has 500 units say user 7 has 400 units
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.