Henry j. 2007-06-13 00:43:50
I found out that in our application the first data rows of some data
files have been cut off when the data files are uploaded into sybase
(v 12.5 on solaris).
I use the -F 2 option to skip the header row. However the 2nd row,
which is the first data row, is skipped as well. If I use the -F 1
option, the first data row is skipped as well. I tried all different
approaches, including inserting some blank rows between the header and
the first data row, no luck. The first data row is still skipped.
If I remove the header row, and use -F 1, it works fine.
The problem data file has 67 columns, not sure if this causes the
problem to occur. But my data files with far less columns work fine
where the -F 2 option just skips the header row as expected.
Does any one know if this is a bug? Any info is appreciated. Thanks
The version of the BCP is:
Sybase CTBCP Utility/12.5/P-EBF11057 ESD#11/DRV.18.104.22.168/SPARC/Solaris
2.8/BUILD125-029/OPT/Thu Apr 17 00:46:17 2003
Bret 2007-06-13 00:44:05
Does the header row have the correct number of column terminators, and
the same line terminator as the data rows?
Keith 2007-06-13 00:44:06
That was my thought too; did the file come from a WinDOS machine or
similar, and you neglected to run dos2unix on it?
Can you verify the newline character w/ the “od” command or “sed -n
1,3l” or somesuch?