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.  Syntax or condition logic

    Employee
    Posted 07-11-2014 01:23

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

    Originally posted by: sree

    Hi Team,

    I need to select records based on below conditions and load it in target file, Can you please suggest syntax or logic for the following condition .

    conditon to use to extract records:
    ----------------------------------
    dept-id in between '5000' and '5099' and location = '30', '31', '32', '33'

    Thank you for all your support.

    Regards,
    Sree.


  • 2.  RE: Syntax or condition logic

    Employee
    Posted 07-11-2014 09:28

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

    Originally posted by: stonysmith

    In a filter:



    emit *
    where 'Dept-Id'>= "5000" and 'Dept-Id'<="5099"
    and (Location=='30' or Location=='31' or Location=='32' or Location=='33')


  • 3.  RE: Syntax or condition logic

    Employee
    Posted 07-11-2014 11:43

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

    Originally posted by: rhallmark

    The code you provided Stony may not have the desired effect if the 'Dept-Id' happens to be '501'. I'd recommend converting the Dept-Id to a number first. See below:

    emit *
    where 'Dept-Id'.long()>=5000 and 'Dept-Id'.long()<=5099
    and (Location == "30" or Location == "31" or Location == "32" or Location == "33")