title: Convert wrong data type to null with T-SQL bulk insert
body: <p>I'm converting an Access mdb application to a WPF application that uses a local t-sql database.</p>
  
  <p>In this application it imported a tab-delimited text file using DoCmd.TransferText, so I am using a t-sql bulk insert instead as follows:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[sp_insLoans]
  @FileLocation nvarchar(500)
  AS
  DECLARE @sql NVARCHAR(4000) = 'BULK INSERT tblLOAN FROM ''' + @FileLocation + ''' WITH ( FIELDTERMINATOR =''\t'', ROWTERMINATOR =''\r'' )';
  exec(@sql)
  </code></pre>
  
  <p>However for whatever reason, sometimes these files have a letter in a numeric column. The DoCmd.TransferText function appears to convert it to null/blank.</p>
  
  <p>Is there a way that I can convert this letter to null for that column when I do the bulk insert? </p>