Can I query a tab-delimited file from SSMS?
You must create a schema.ini file containing the delimiter in the same directory as the text file you are opening. This is the only way to override the registry values on a per-file basis. See the file format documentation on MSDN. Example:
SELECT *
FROM OPENROWSET(
'Microsoft.ACE.OLEDB.12.0',
'Text; HDR=YES; Database=C:\Text',
'SELECT * FROM testupload2.txt')
In C:\Text\schema.ini:
[testupload2.txt]
ColNameHeader=True
Format=TabDelimited
MaxScanRows=0
If this activity needs to be repeated frequently, I would suggest a script to create schema.ini. Multiple files can be referenced in the same schema.ini or a separate schema.ini can be included with each text file in its own directory.