0

Seeking Best Approach to Add a Counter to a Table That Resets Based on Another Field

I have a table and I need to have a counter that restarts based on another field on the table. 

In my case I have a JournalBatchNumber field.  For each new batch, I need to generate a LineNumber restarting with 1 for each record of the same batch. 

Is this available in TX natively, or do I need to write a post processing script using rownumber (). 

 

Thanks,

Greg

2 comments

Please sign in to leave a comment.