I have a massive data file (tab delimited). I'm experiencing a data shift- at some point, the date field becomes populated with non-date values (the words from the description field to the left of it). As you can imagine, I can't just scroll through the text file, or plop it into excel to dig around- I need to know where to look.
I am trying to add row numbers to the imported table, so that I can identify the row where the data shift occurs. So, I am wondering if there is a way to insert row numbers without having to order by anything (i.e. essentially number the rows of the original data file).
Using
ROW_Number() OVER (ORDER BY (___))
I'm not sure how to accomplish what I'm trying to do, because I can't order on anything- it needs to be numbered exactly as it was imported.
SELECT NULLorSELECT 1.ORDER BY, there is no guaranteed order in SQL. E.g. if the server happens to experience a Page Split or any other event that rearranges data 'under the hood', then the order of returned rows will also change. And this may have happened many times before you even run your first query.SELECT NULLorSELECT 1which will not produce repeated results, you'll want to read this: blogs.msdn.microsoft.com/conor_cunningham_msft/2008/08/27/…