Home » SQL & PL/SQL » SQL & PL/SQL » Find a break in number sequence (Oracle 9i)
Find a break in number sequence [message #359781] Tue, 18 November 2008 03:49 Go to next message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Hi,

i have a data stored like this,

pid bagno
2722 1
2722 2
2722 3
2722 4
2722 5

2722 7
2722 8
2722 9
2722 10
2722 11
2722 12

i want result like this,

pid min(bagno) max(bagno)
2722 1 5
2722 7 12

Please provide me sum analytic function of oracle or such a query which return this result.

Thanks
Re: Find a break in number sequence [message #359784 is a reply to message #359781] Tue, 18 November 2008 03:53 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Check this link.

http://www.orafaq.com/forum/m/356100/94420/#msg_356100

Could you please read the forum guidelines on how to format your post?

Regards

Raj
Re: Find a break in number sequence [message #359819 is a reply to message #359784] Tue, 18 November 2008 04:44 Go to previous messageGo to next message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Raj,

i have read the document,but i'm not getting clearly.please reply me a sample query

Thanks
Re: Find a break in number sequence [message #359821 is a reply to message #359819] Tue, 18 November 2008 04:55 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Quote:

i have read the document,but i'm not getting clearly.please reply me a sample query


Which bit you are not getting it clearly. Post what you have tried so far. We will take it from there.

Regards

Raj
Re: Find a break in number sequence [message #359830 is a reply to message #359781] Tue, 18 November 2008 05:35 Go to previous message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Sorry Raj,

It was my mistake,i look at the document once again n i'm able solve my problem,thanks for giving me the link.


Regards
Previous Topic: Swapping Synonyms in production
Next Topic: Procedure
Goto Forum:
  


Current Time: Thu Dec 08 00:33:29 CST 2016

Total time taken to generate the page: 0.12423 seconds