According to the documentation, several of the "fields" in the data represent up to 10 digits of numeric information. While the max number of digits for an INT is, indeed, 10, it's not a full 10 at the most significant place. You should use DECIMAL(10,0) for those, instead.
Several of the columns are date fields but you're not using them as dates and you probably should.
The documentation also clearly lays out the maximum number of characters for each field. I strongly recommend that you get away from the VARCHAR(255) stuff that so many people end up doing because you actually do WANT import failures to occur if they include wonky data that doesn't meet their own spec.
Also, change the VARCHAR columns that have a max length of 2 to CHAR(2). In fact, my general recommendation is that if something is 10 or fewer characters, consider using CHAR instead of VARCHAR.
Also, if things keep blowing up on you for length, perhaps try \ r \ n (without the spaces) for a line terminator.
And, thank you for the awesome link for the NPI data... There are sooooooooo many awesome things I can teach folks with such a readily available data set.
is pronounced "ree-bar
" and is a "Modenism
" for R
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
"Change is inevitable... change for the better is not".
"Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)