Common BCP Traps

Be on the lookout for the following traps. They always seem to be lurking out there.

  • Invalid dates— When importing data, a data file that contains dates represented as 00/00/00 and 000000 will fail. These are invalid SQL Server date formats. This problem often arises when data is transferred from a mainframe system to SQL Server. You must adhere to SQL Server date formats when importing date information into datetime columns.

  • Space-filled dates— When importing spaces into a datetime column, SQL Server defaults the column to 1/1/1900. This is probably not what you want! To avoid this problem, do not pad the column with any data; just follow the column with a delimiter. SQL Server sets the data column to NULL, which is presumably ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.