Home » Developer & Programmer » Reports & Discoverer » Sequence No reinitialization
Sequence No reinitialization [message #406809] Sat, 06 June 2009 00:47 Go to next message
jkanani
Messages: 4
Registered: June 2009
Location: Ahmedabad
Junior Member
Hi,

I am using Ora report 10g. I want to reinitialize sequence number when group field change. to be more specific say there are container number and each container may have number of bundles. How can the sequence number be reinitialize when container no get change. e.g.

CONT No : CONT1
===============
Seq. No. BUNDLE No.
====== =========
1 abc
2. bcd
3. cdf

CONT No : CONT2
===============
Seq. No. BUNDLE No.
====== =========
1 xyz
2. pqr
3. mno
Re: Sequence No reinitialization [message #406828 is a reply to message #406809] Sat, 06 June 2009 03:16 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create a summary column; function is "Count", its source should be "Bundle No" and should be reset at "CONT No" group.


Another option is to use analytical function, such as
SELECT cont_no, bundle_no,
  ROW_NUMBER() OVER (PARTITION BY cont_no ORDER BY cont_no, bundle_no) rn
FROM your_table
WHERE ...
If you choose to use this approach, you don't need to create a summary column (of course).
Re: Sequence No reinitialization [message #406829 is a reply to message #406828] Sat, 06 June 2009 03:24 Go to previous message
jkanani
Messages: 4
Registered: June 2009
Location: Ahmedabad
Junior Member
Created summary column & It's works fine.

Thanks.
Previous Topic: Report flooding smtp ?
Next Topic: Conditional Printing
Goto Forum:
  


Current Time: Mon Dec 05 19:29:29 CST 2016

Total time taken to generate the page: 0.09645 seconds