Page 1 of 1

Complex Survive Expression

Posted: Tue May 22, 2012 10:13 am
by DSShishya
Hi all,

I have always used out of box survive rules in QS and now need some help with "Complex Survive Expression" in Survive stage. My requirement is to give priority to records source wise. e.g. If there are three records of same customer from 3 different sources SRC1, SRC2 and SRC3 (all consolidated in one file) then I need to survive the record from SRC1 (Top priority for SRC1, next SRC2 and finally SRC3).

Is there a way we can accomplish this using complex survive rule in survive stage?

The only functions I can see there are SIZEOF,TRIM (no If else) and bunch of mathematical operators

Thanks!

Posted: Tue May 22, 2012 12:54 pm
by rjdickson
Hi,

Try putting in three rules (in this order, top to bottom):
1. <AllColumn> SourceCol Equals "SRC3"
2. <AllColumn> SourceCol Equals "SRC2"
3. <AllColumn> SourceCol Equals "SRC1"

This will survive records with SRC1 having priority over SRC2, and SRC2 having priority over SRC3.

Posted: Tue May 22, 2012 2:55 pm
by DSShishya
Thanks Robert!

At first glance, looks like it works. I need to do some more testing tho.

I will update the post.

Thanks again.