Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How best to deal with decimals using Bulk Insert

$
0
0

This is convoluted but here goes.

First, this process is done via the Import and Export Wizard. It is a fixed width flat file that gets broken up into 93 columns. There are two values in particular that are prompting this question... latitude and longitude. When I use the wizard, I chose datatype: string (DT_STR) and then 9 and 11 characters respectively. This works but I am trying to avoid this long drawn-out process.

Because I have no admin rights, SSIS is out of the question. So I try bulk insert using the code below. I get an error about how values will be truncated. If the format file follows the same layout as what I specify in the wizard, how am I getting this error?

Text
bulk insert largefile From 'C:\Users\someone\Desktop\largefile_import\A145.JOB021C.FILE.NV172' WITH (FORMATFILE = 'C:\Users\someone\Desktop\...

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>