Data from SQL Server bit columns (DT_BOOL ) as -1
Hi All Question is similiar to http://social.msdn.microsoft.com/forums/en-us/sqlintegrationservices/thread/1058C2F7-4E7D-4A75-A141-6C2B6F483922 Source SQL Destination Oracle There are very many bit fields in SQL tables in Oracle they are mapped to : VARCHAR2(1) '1' , '0' but turned out that bit mapped to DT_BOOL and for DT_BOOL true is -1 The Integration Services Expression Language converts True to -1. One workaround is use cast in source : select cast(bit1 as tinyint) bit1 second : add new derived field bit1 == TRUE ? 1 : 0 But may be there is more general way out ? I have 20 tables (in some there are 40 bit fields !!!) I try to change in SqlClientToSSIS.XML mapping of bit to DT_UI1 instead of DT_BOOL - but seems it is affects only Import/Export wizard It would be great but it does not work it was said : then a script transformation component can be employed to convert any column of each table could someone provide basic VB code fr this or propose another workaround
January 19th, 2011 10:19am

I don't think you're going to get any better way to work around this. Unfortunately, the different platforms chose to store true and false differently. In the Microsoft world they interpret "false" as zero, and "true" as "not false" - which they tend to implement as -1. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2011 11:41am

Thanks Todd I have other big problem Oracle VARCHAR2 mapped on DT_STR on my PC (Oracle OLE DB provider) acc. help it should be to DT_WSTR in OracleClientToSSIS10.XML : <!-- VARCHAR2 --> <dtm:DataTypeMapping > <dtm:SourceDataType> <dtm:DataTypeName>VARCHAR2</dtm:DataTypeName> </dtm:SourceDataType> <dtm:DestinationDataType> <dtm:CharacterStringType> <dtm:DataTypeName>DT_WSTR</dtm:DataTypeName> all is ok and on remote PC Oracle VARCHAR2 mapped on DT_WSTR As result my packages fail due to differernt types It is crittical problem for me (only difference I see is I installed SQL 2008 R2 when on remote is SQL 2008) Any ideas (or workarounds) for reason of different behavior are welco
January 19th, 2011 11:56am

Fedor, I moved your next question to its own thread... I don't know too much about Oracle. Except you may want to try the Attunity adapters published by Microsoft. Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2011 1:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics