0

I have a large set of data (around 5m rows) in a dat file that I am trying to import into SQL Server. The first column should contain ID numbers. I can see the ID numbers in the preview of the Import Wizard, but they become blank when the data is actually imported. No error message is given.

I believe the reason is that they contain an ASCII null control character (0). I discovered this by using a PERL script on the data but I'm not entirely sure what it means. Does anyone know if this Null character is responsible for removing the data during import, and how to stop it?

1 Answers1

0

It all depends on what you are trying to do. Here are some questions that I have.

1 - Are you using the import/export tool?

2 - Is the source file text? If so, is it ASCII or UNICODE.

3 - What generated the source file text file that you are trying to work with?

Here is a link to bcp. A CHAR(0) is considered a NULL character. If it is in the ID field, it is probably setting that field to NULL.

http://technet.microsoft.com/en-us/library/ms191485.aspx

CRAFTY DBA
  • 14,351
  • 4
  • 26
  • 30