How to generate a line number based on condition
I have an InvoiceLineItem table where line number is not added to the table. I have to create it on the fly while processing the table.
Identifier on yearly base
I want a monoton increasing identifier for each year, starting with 1 on each year. NULL BusinessKey rows can be just appended (I’ll call the function in an INSERT Trigger):