ISNULL changing my Trues to False for Boolean Field

  • I have a column coming from one database to another database. The original database the column has a datatype of smallint with 1, 0 or null. The database its going to the same column is not a bit. So 1 becomes true, 0 becomes false. The new database the bit column does not allow nulls, so I need to do a isnull and if the old source column is null, then false, else the value in the column. So, I have a data converion changing from smallint to boolean, then a isnull on the data conversion column. Its changes everything to false each time. I setup a data viewer on each step, and its true until it hits that dervied column and it changes to false. Below is my syntax. Can anyone help.

    ISNULL(DC_P_ACTIVE ? FALSE : DC_P_ACTIVE)

    the original colum name is p_active. DC_P_ACTIVE is the data conversion of that original column. Why is it changing my trues to false?

  • Looks to me that you just have to move the parenthesis, as in:

    ISNULL(DC_P_ACTIVE) ? FALSE : DC_P_ACTIVE

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • thank fixed it, thanks alot!!!!!!!!

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

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