79695418

Date: 2025-07-09 09:52:19
Score: 1
Natty:
Report link

One flaky behavior that some people may encounter is that alternating letter-digit strings used as column headers can cause problems with the "Import Flat File" task in SSMS (SQL Server Management Studio V21).

I was trying to import a census data file with data headers of the form "B07013_M018". The "Import Flat File" would recognize that the first row was headers (and so would not include it as a row), but would nonetheless not use the headers, substituting "column1", . . . -- not useable with a large number of columns.

With some experimentation I found that column headers that begin with letters and end with numbers import OK, but not if trailing letters are added. So, for example: The task will accept "R9" as a column header, but not "R9D". This is true whether or not the strings are quoted in the import file. Both of these are, of course, perfectly valid field names in T-SQL. The behavior persists even when only a single column file is imported.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Will Brownsberger