×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Getting the order# to work via identity column, or sequence object, is a
snap.

However, incrementing the order line number where you can a duplicate line
number, but not a duplicate order/line combo, is a little different. This
will take some logic like

select ifnull(max(orderline), 0) + 1
from ordline
where ordernumber = :myOrderNumber;

The ifnull covers adding the first line.

Personally I find this easier than some sort of READ or READP permutations
to determine the next available line number.


Rob Berendt

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.