I need to delete from row number 475 to 948 due to them being duplicates of rows 1-474. It would be something close to this, I presume, or is there more to it?
DELETE FROM dbo.industry WHERE row_number between 475 and 948
I need to delete from row number 475 to 948 due to them being duplicates of rows 1-474. It would be something close to this, I presume, or is there more to it?
DELETE FROM dbo.industry WHERE row_number between 475 and 948
COLUMN_NAME can be any column name of your table u want.
This is not really an answer. There were a few issues with the data that made the answers above (while excellent) unrelated. I simply deleted the table and then re-imported it from fixed width. This time, I was more careful and did not have the duplication.
If you are trying to delete using the
Row_Number
function, and you get an error ofyou can revise the SQL to have it in the select clause as in the example below:
May be it is too late, but I am usually doing this