September 19, 2003 at 8:05 am
During the testing of an extract from bcp we noticed that where
the last field was NULL, bcp failed to export the last column.
In other words, the exported text file is missing one column.
This only applies where the contents of the last column is NULL.
Where it is filled BCP works fine.
However, BCP does not consistently do this - for some extracts it works fine even with NULLS.
To work around this problem alter your view so the last column is forced to put a space character where the records is NULL e.g.
ISNULL(Table.Column, char(32)) AS ColumnLabel
Has anyone else come across this issue? Does anyone know what is causing it?
September 21, 2003 at 5:37 pm
It's the same thing that happens in the DTS datapump and also when importing into MS Access and MS Excel. The first row determines the fields and datatypes. If the last column is NULL then there is no way for the process to know there is a field there.
This is mostly rectified with the ISNULL method you've used.
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
--------------------
Colt 45 - the original point and click interface
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply