The [AdventureWorks2008].[Sales].[SalesOrderDetail]
table looks like it has an error in the SalesOrderDetailID column. My guess is that this column is suppose to have a sequential set of number based on the SalesOrderID column, i.e. 1 to 12 for SalesOrderID=43659. Instead the values in the SalesOrderDetailID
column are continuous with no indication of it being sequential by SalesOrderID.
Or maybe the values are right and I don't understand the data in the table. But if I am right, is there a way to fix this using T-SQL or PL-SQL?