I have a problem whit an import from a TXT file to a Table in SQL Server 2016, that fails import all rows. I'm trying to read the data using OPENROWSET statement, whit an XML to define the correct format of the columns in the file.
So I use this script to read the data:
select *
FROM OPENROWSET (BULK 'C:\SQL_DATA\VAR_REG_20190831.TXT',
FORMATFILE = 'C:\SQL_DATA\MR_VAR_REG.xml' AS t1;
it start, but at 18954 rows it finish successfully, but the file are made by 30000+ rows. The problem isn't in the data, because if i copy a recors that are imported, in the position 18.954, previous and next for secure the problem persist.
it's like there is a limit of rows to import. Please someone can explain me why SQL do that?