Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6659653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:03:30+00:00 2026-05-26T02:03:30+00:00

I’m trying to run this query (I also tried it without specifying FIELDTERMINATOR and

  • 0

I’m trying to run this query (I also tried it without specifying FIELDTERMINATOR and ROWTERMINATOR). It’s using a datafile that I am manually creating beforehand (not with bcp out).

BULK INSERT FS.dbo.Termination_Call_Detail
FROM 'C:\Termination_Call_Detail__1317841711.dat'
WITH
(
 FORMATFILE = 'C:\Termination_Call_Detail__update_TerminationCallDetailData.fmt',
 FIELDTERMINATOR = '\t',
 ROWTERMINATOR = '\r\n'
)

The errors I’m getting:

Server message number=4864 severity=16 state=1 line=1
server=USA109MSSQL1A
text=Bulk load data conversion error (type mismatch or invalid
character for the specified codepage)
for row 1, column 9 (RouterCallKey).

Server message number=4832 severity=16 state=1 line=1
server=USA109MSSQL1A
text=Bulk load: An unexpected end of file was encountered in the
data file.

Server message number=7399 severity=16 state=1 line=1
server=USA109MSSQL1A
text=The OLE DB provider “BULK” for linked server “(null)”
reported an error.
The provider did not give any information about the error.

Server message number=7330 severity=16 state=2 line=1
server=USA109MSSQL1A
text=Cannot fetch a row from OLE DB provider “BULK” for linked
server “(null)”.

I’m trying to get it working with just 1 row.

ASCII datafile:

611658275664    1                       5027    5001    5005    5010    2011-10-05 14:53:44     1317840824      240     2011-10-05 14:54:04     1317840844      150026  211     2       1       4480    21543   28      0       29      0       0       0       0       29      0       0                       0       IPT_Call        TAC_Rollover                                                                    424755/4        N       0       5030    5000    2865                    805336626                       2674794299      N                                               1       3       N       0               0

Hex dump of the datafile: http://pastebin.com/grnwQrdT

The format file: http://pastebin.com/WwSQvCGg

The table schema: http://pastebin.com/gFjp4xYy

This insert is using 66 columns; the table contains 84 columns. If I create a format file with bcp of the whole table, and a datafile of this same row, I can run this BULK INSERT QUERY without a problem.

Hex dump of a datafile created by bcp on the same row of data (with all the columns): http://pastebin.com/MpMk6iq4

I meticulously looked for any missing newlines or tab delimiters, but I cant find any. You can see on the hex dump of the datafile that everything looks properly delimited. I compared it to a datafile created by bcp and couldn’t find any formatting differences.

I also cant imagine why its complaining about that particular field (RouterCallKey) – there are other fields above it in the format file that are the same type (like RouterCallKeyDay).

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:03:31+00:00Added an answer on May 26, 2026 at 2:03 am

    Wouldnt you know it, I figure it out right after I get frustrated enough to post the question. There was a logical bug elsewhere in the code that created the datafile that was feeding this bulk insert query the wrong form

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.