Hello all,
Apologies if this is posted in the wrong forum, however I wasn't exactly sure as to which one would be the best for my query...
I have recently inherited the job of maintaining a database of internet logs and I am using the bcp utility to bulk insert rows into the database. The problem is that for the fields which are classified as SQLBIT in the .fmt file (and the field in the database is bit) are always inserted as '1' even if the data is actually a '0'. Any value will be inserted into the database as a 1 except for NULL which is inserted as NULL.
I tested changing the type to SQLCHAR in the .fmt file, and this allows the insert of a 0 into the database.
Does anyone have any ideas as to why this is happening? The database is SQL Server Standard Edition running on NT 4.0.
Any help/suggestions would be greatly appreciated.
Regards,
Daniel
Hope that explains it for you,
Don
yes, that makes perfect sense...thanks very much for your help! I'll insert them as a type SQLCHAR.
Cheers,
Daniel
No comments:
Post a Comment