473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to write a query which will allow me to capture multiple events

I would like to be able to group consecutive SortID's by SortType's T1,
N1 and P1. For instance, I need to be able to group SortID's 12123,
12122 & 12121. The SortID type is Number and the SortType (type) is
text. Any help would be much appreciated.

Thanks,
Scott

SortID SortType
12123 P1
12122 N1
12121 T1
12120 P1
12119 N1
12118 T1
12117 P1
12116 N1
12115 T1
12114 P1
12113 N1
12112 T1
12111 P1
12110 N1
12109 T1
12108 P1
12107 N1
12106 T1

Jan 12 '07 #1
2 1112
select sortId, sortType from tblX order by sortId Desc, sortType

scstrac...@gmail.com wrote:
I would like to be able to group consecutive SortID's by SortType's T1,
N1 and P1. For instance, I need to be able to group SortID's 12123,
12122 & 12121. The SortID type is Number and the SortType (type) is
text. Any help would be much appreciated.

Thanks,
Scott

SortID SortType
12123 P1
12122 N1
12121 T1
12120 P1
12119 N1
12118 T1
12117 P1
12116 N1
12115 T1
12114 P1
12113 N1
12112 T1
12111 P1
12110 N1
12109 T1
12108 P1
12107 N1
12106 T1
Jan 12 '07 #2
Same result.

What I am trying to do is capture a series of ID's. For instance" I
need to be able to group 12123 P1, 12122 N1 & 12121 T1 together. This
equals all the activity for 1 day. Each grouping of P1, N1 & T1 need
to be captured together, along with the corresponding sortid. Hope is
a better explanation.

Scott

On Jan 12, 4:33 pm, lesperan...@natpro.com wrote:
select sortId, sortType from tblX order by sortId Desc, sortType

scstrac...@gmail.com wrote:
I would like to be able to group consecutive SortID's by SortType's T1,
N1 and P1. For instance, I need to be able to group SortID's 12123,
12122 & 12121. The SortID type is Number and the SortType (type) is
text. Any help would be much appreciated.
Thanks,
Scott
SortID SortType
12123 P1
12122 N1
12121 T1
12120 P1
12119 N1
12118 T1
12117 P1
12116 N1
12115 T1
12114 P1
12113 N1
12112 T1
12111 P1
12110 N1
12109 T1
12108 P1
12107 N1
12106 T1- Hide quoted text -- Show quoted text -
Jan 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ben | last post by:
I have a Session table: Username Type ------------------ bob private bob private sally private bob duet And I have an event table
2
by: Rich Tasker | last post by:
My goal is to execute a DTS package that calls multiple child DTS packages from a C# (2003) app and display the progress of the entire process to the user. I have followed the model defined in...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
5
by: Ryan Hubbard | last post by:
Is it possible to get the recordset from an open query window? So you run the query. The window is open. Can vba retrieve this data?
4
by: d.p. | last post by:
Hi all, I'm using MS Access 2003. Bare with me on this description....here's the situation: Imagine insurance, and working out premiums for different insured properties. The rates for calculating...
1
by: Dhruba Bandopadhyay | last post by:
I know that JavaScript lets us add: ondragenter, ondragover, ondragleave, ondrop events to normal HTML table td tags. This lets us do highlighting of table cells/rows, and capture drag & drop...
1
by: mrkselm | last post by:
Hi, I am stuck with a problem in MS Access which does not occur in SQL Server and I have been banging my head against the wall for a couple of days now trying to resolve it. Namely, when I...
2
by: DMogadati | last post by:
Hi, Is it possible in MS Access to view at a given time how many users are accessing the Access database and gain visibility into which query (s) they are using...?
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.