I currently have a table in sql server with 600 records and
growing. The table contains main columns ref_no,qty, etc. We plan
to add another column for line items.So if ref_no 12345 currently
is in the table five times with five different quantities, it would
have line item numbers 1, 2, 3, 4, 5. If ref_no 99999 in in the
table twice, then it would have line item numbers, 1,2. The boss
wants me to manually add the line numbers for each ref_no. But this
is rediculous, cumbersome and very tedious.
I know there is a better way to do this, just cant think of
it. What is the most efficient way to add the line numbers for each
ref_no ?