By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.