Using Type cast in Conditional Split

  • Hi, any one knows how to use Type Cast in Conditional Split? Basically I have a column called Property and I have numeric 38,0 assigned to it. But I am tring to separate some columns that does not match this criteria. How to use this on the Conditional Split?

    I tried [PROP_AST_ID] (DT_NUMERIC, 38, 0) but it is still in red. I need to know this.

    [font="Verdana"]Imagination is more important than knowledge-Albert Einstein[/font]

  • I don't know if this helps you - but if you use the data conversion task to attempt the conversion - there's a "red arrow" coming out of it which you can drag to something else. This represents all of the errors that would happen (i.e. the rows where the conversion fails.). You can then set the error handling on that task to "redirect rows".

    On a slight twist - you can choose to redirect rows ONLY when a given column fails the conversion.

    ----------------------------------------------------------------------------------
    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?

  • The syntax for a type cast is , i. e. (DT_NUMERIC, 38, 0) [PROP_AST_ID]

  • Matt Miller (2/14/2008)


    I don't know if this helps you - but if you use the data conversion task to attempt the conversion - there's a "red arrow" coming out of it which you can drag to something else. This represents all of the errors that would happen (i.e. the rows where the conversion fails.). You can then set the error handling on that task to "redirect rows".

    On a slight twist - you can choose to redirect rows ONLY when a given column fails the conversion.

    This really helps! I didn't even think about that. Thanks for helping.;)

    [font="Verdana"]Imagination is more important than knowledge-Albert Einstein[/font]

  • Alexander G. (2/15/2008)


    The syntax for a type cast is , i. e. (DT_NUMERIC, 38, 0) [PROP_AST_ID]

    Thanks of helping. I got the same as yours from the MSDN site, but it still did not work for my case. Also, I think it will not work for the logic that I have to compare for datatypes. Conditional split does not allow to compare that. Thanks again for helping. Appreciate it;)

    [font="Verdana"]Imagination is more important than knowledge-Albert Einstein[/font]

  • Use conditional split before destination.

    Create variable.Then open conditional split transformation editor make condition with column name.

    for example.

    order: 1

    output name : write variable name

    condition: column name <> 38

    thats all.

Viewing 6 posts - 1 through 5 (of 5 total)

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