how boolean is converted to bit

  • I have a source like

    pkg_in.xml_p (decode(b.is_flg,1,'False','True'), 'ISDFLG')

    So from source is returning true or false

    When source is loaded into destination how this Boolean is converted to 0 or 1?

    SSIS package - truncate temp table and for each loop container(in this load xml to table) but the actual ISDFLG column in the table is bit.(data type)

    I see in my load xml file to table in xsd -

    <xs:element minOccurs="0" name="ISDFLG" type="xs:string" />

    After loading into destination table it is showing as 0 or 1.

    Not sure where it is doing conversion..checked in all the ways.

    If you are aware of this issue,please share it.

  • mcfarlandparkway (9/8/2016)


    I have a source like

    pkg_in.xml_p (decode(b.is_flg,1,'False','True'), 'ISDFLG')

    So from source is returning true or false

    When source is loaded into destination how this Boolean is converted to 0 or 1?

    SSIS package - truncate temp table and for each loop container(in this load xml to table) but the actual ISDFLG column in the table is bit.(data type)

    I see in my load xml file to table in xsd -

    <xs:element minOccurs="0" name="ISDFLG" type="xs:string" />

    After loading into destination table it is showing as 0 or 1.

    Not sure where it is doing conversion..checked in all the ways.

    If you are aware of this issue,please share it.

    SQL Server does it for you.

    Try running this:

    DECLARE @x BIT;

    SET @x = 'true';

    SELECT @x;

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Wonderful,TY So much.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply