dbTalk Databases Forums  

DTS bit fields change to False/True

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


Discuss DTS bit fields change to False/True in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
amber
 
Posts: n/a

Default DTS bit fields change to False/True - 01-26-2004 , 12:22 PM






I'm running a basic DTS of a view, exporting to CSV
format. I have several fields that are bit (1) which
convert themselves to False/True instead of remaining 0/1.

How can I keep the field bit(1) and display the 0/1
instead of text?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS bit fields change to False/True - 01-26-2004 , 02:30 PM






In message <494e01c3e439$6d1de390$a401280a (AT) phx (DOT) gbl>, amber
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
I'm running a basic DTS of a view, exporting to CSV
format. I have several fields that are bit (1) which
convert themselves to False/True instead of remaining 0/1.

How can I keep the field bit(1) and display the 0/1
instead of text?
You could use a Source SQL Query and cast them to an integer type, e.g.

SELECT CAST(BitField AS tinyint) AS BitField, OtherFields...
FROM dbo.MyTable

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.