Re: how to create query ??????????
Date: 16 Jan 2004 20:52:40 -0800
Message-ID: <febbed51.0401162052.8018294_at_posting.google.com>
its a example only
i have thousand of rows in my table
AND I WANT TO GROUP ACCORDING TO PARTICULER SEQUENCE
if start_no and end_no in particule sequence then group it
else
create another group of another series
start and end no means:-
start_no-1=last_no of previous record;
IF EQUAL THEN IT IS A SERIES
****LIKE THIS *******
particuler sequence is like
start_no last_no
1 100
101 200
201 300
(this is a sequence from 1 to 300) NO BREAK IN SEQUENCE
and
another
5001 5100
5101 5200
this sequence is start from 5001 to 5200
if i insert new values in table
insert into <table name> values(1,5501,5600);
so now 3 group is created
3 1 300
2 5001 5100
1 5501 5600 <----because it will not in series
if start_no is 5101 in place of 5501
then it will group in series of 5001
and 5001 series return qty 3 in place of 2
thanks
kuljeet pal singh
Received on Sat Jan 17 2004 - 05:52:40 CET