dbTalk Databases Forums  

Bulk insert Bit values

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Bulk insert Bit values in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert Burdick [eMVP]
 
Posts: n/a

Default Bulk insert Bit values - 04-24-2005 , 11:15 AM






Hi Gang:

I've inherited a database that contains a number of tables with bit value
columns. I am trying to write a script with bulk insert statements to
reconstruct the database. When I export the table data, the bit fields get
converted to string equivalents (True and False.) When the bulk insert
statement for the same table executes, I get errors saying that these values
can't be converted to bits.

Can you tell me how to export the data from my tables into text files so
that the bit values can be re-imported / bulk inserted correctly?

Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Bulk insert Bit values - 04-24-2005 , 12:30 PM






Why not use the native mode of BCP instead? That is the cleanest and
fastest way to export out and back into SQL Server tables. Check out BCP or
Bulk Insert in BooksOnLine for more details.

--
Andrew J. Kelly SQL MVP


"Robert Burdick [eMVP]" <RobertBurdickeMVP (AT) discussions (DOT) microsoft.com> wrote
in message news:F79A3F00-23EC-4027-884C-0C38696DCB15 (AT) microsoft (DOT) com...
Quote:
Hi Gang:

I've inherited a database that contains a number of tables with bit value
columns. I am trying to write a script with bulk insert statements to
reconstruct the database. When I export the table data, the bit fields
get
converted to string equivalents (True and False.) When the bulk insert
statement for the same table executes, I get errors saying that these
values
can't be converted to bits.

Can you tell me how to export the data from my tables into text files so
that the bit values can be re-imported / bulk inserted correctly?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.