Hi. Looking for someone to help with a query I'm tring to run.
I have a table with thousands of rows and need to find all records referenced by one another by a column
The table looks like the following:
ID Barcode CreateDate OldBarcode
1 101 8/10/2022 NULL
2 102 8/10/2022 NULL
3 103 8/12/2022 102
4 104 8/13/2022 103
I need to be able to get the first date of the original row where the 102 barcode was created. Barcode 103 replaced it on one day, then barcode 104 replaced that one. So I wanted to get to the original barcode. There are other instancnes of this in the same table, so I'd like to be able to get back to that first barcode number for all the rows.
Hopefully this makes sense.