none
Creating a sequence number based on another column(s) RRS feed

  • Question

  • I have the following example data:

    Location and Invoice # and I need to add a third column that is a sequence number of the invoice lines at a location.

    Location     Invoice #     Expected Seq #

    1               1                 1

    1               1                 2

    2               1                 1

    2               2                 1

    3               1                 1

    3               1                 2

    3               1                 3

    3               4                 1

    4               1                 1

    How can I create this sequence number?  The data is in location invoice order.

    Select Location, InvoiceNum, ?????????

    From Invoice_Table

    Tuesday, November 26, 2019 8:54 PM

All replies