LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Reject "-" vale records from spource to target

    Employee
    Posted 04-25-2014 23:07

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sree

    Hi,

    In one of my source column,getting records like "-"(hypen) value,but i need to reject those records while loading into target.
    I used the following logic in Filter node

    if 'WEEKLY WORKING HOURS' > "40" or 'WEEKLY WORKING HOURS' == "-" or isnull('WEEKLY WORKING HOURS')
    then MinWklyhours = "40" else MinWklyhours = 'WEEKLY WORKING HOURS'


    But still "-"(hypen) value records coming to target,please suggest what approach we need to use to eleminate "-" value records into target loading.
    Thanks in advance for all your help.
    Regards,
    Sree.


  • 2.  RE: Reject "-" vale records from spource to target

    Employee
    Posted 04-27-2014 04:55

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Is the "WEEKLY WORKING HOURS" field a string field or a number field?
    Do the "WEEEKLY WORKING HOURS" values with the problem only contain a hyphen, or are there other characters or digits, or even whitespace (" ") within the field?

    Using the ">" operator, it looks like you are trying a numeric comparison - which will only work on numeric (int, long, double*) fields.
    However, you are comparing against strings - "40" and "-".
    If the value is numeric, then you should be comparing against the actual values - e.g. 'WEEKLY WORKING HOURS' > 40
    If these are numeric fields, then the "hyphen" would really just be a negative sign which prefixes a number value, meaning that you should be comparing for 'WEEKLY WORKING HOURS' < 0 rather than 'WEEKLY WORKING HOURS' == "-"

    Can you post a sample of the data (brd format) with the problem?
    This will help in assisting you with the issue you are having.

    Regards,
    Tim.

    * Note that with double fields, the LAE data format uses IEE-754 floating point numbers, not fixed point numbers, therefore for numeric comparisons you need to take floating point error into account - e.g. rather than checking that a field == 0, you would check that the absolute value of the field < 0.0001 or something similar.