July 8, 2016 at 5:05 am
Hi I want to filter records on below 3 condition. Data is coming from flat file n loading into flat file.
Code = "CPP"
and ClData not in ('n/a',,n/a~')
I am using Conditional Split
Code == "\"CPP\"" && ClData!= "\"n/a\"" ------- If i use this condition only, n/a records are not coming.
Code == "\"CPP\"" && (ClData!= "\"n/a\"" ||ClData!= "\"n/a~\"" ) ------ If i use this condition then both records are coming. i.e. n/a as well as n/a~.
I dont know what is wrong in above expression.
Please help.
Thanks,
Abhas.
July 8, 2016 at 5:13 am
I think this is a logic problem.
If a record is 'n/a' then is does not equal 'n/a~' so it is true.
Try changing the || or && (i.e. OR to AND).
Jez
July 8, 2016 at 5:18 am
Abhas
Assuming that Code is enclosed in double quotes ("CPP") but CIData isn't (n/a), I think your expression needs to look something like this:
Code == "\"CPP\"" && ClData!= "n/a"
John
July 8, 2016 at 6:20 am
Thanks Jhon,
I have changed code as below and its working for me.
Code == "\"CPP\"" &&! (ClData!= "\"n/a\"" ||ClData!= "\"n/a~\"" )
Thanks,
Abhas
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply