: MIDRANGE dot COM Mailing List Archive

SQL Insert with an incrementing line number


AddThis Feed Button


Hey all, can this be done with sql?

insert from one file into another -

"from" file has duplicates for order#, no line.
"to" file keyed by order# / line

I want to auto generate the line number in the "to" file, incrementing
by one for each group of orders, resetting on a change in order
numbers.

I looked at NEXT VALUE using sequence objects, but that doesn't seem
to allow the reset on order number breaks.

Thanks in advance,

Rick




Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2007 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact

.