Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone see anything wrong with the following match statement syntax: I can have a header or line cancellation and it can be a permanent or soft cancel. Some how I am getting a mixed bag. For example 18 being a soft and permanent cancel.
Thanks
if(Match(Hdr_Davey_CancellationCode, '05','06','18','22','24','25','27') or
(Match(Line_Davey_CancellationCode,'05','06','18','22','24','25','27')),1,0) as PermCancel,
if(Match(Hdr_Davey_CancellationCode,'01','02','03','04','07','08','09','10','11','12','13','14','16','17','19','21','23','26','88','99') or
(Match(Line_Davey_CancellationCode,'01','02','03','04','07','08','09','10','11','12','13','14','16','17','19','21','23','26','88','99')),1,0) as SoftCancel
As far as I know, without getting a look at your data one can never explain why 18 is producing two positives.
On first sight, there must be at least one row in your table that has both Hdr_Davey_CancellationCode and Line_Davey_CancellationCode set to 18, correct?
Peter
Hi!
Everithing looks ok.
May be you have Hdr_Davey_CancellationCode=18 and Line_Davey_CancellationCode=18
Sorry, my mistake. I'll start over again.
What happens for example when Hdr=18 and Line=01? Or any of the other possible combinations of Hdr = 5,6,18,22,24,25,27 and Line = 1,2,3,4,7,8,9,10,... or vice-versa? Logic error?
Peter
When I sum the amount I sum it based on Softcancel or PermCancel being = to 1
So the two flags cannot be set at the same time?
Check your possible Cancellation codes. If you have code combinations that trigger both match statements, ...