AnsweredAssumed Answered

CASE's versus IF's

Question asked by mz5005 on Feb 21, 2019
Latest reply on Feb 24, 2019 by siplus

I need to compare two tables record by records on several fields: 50K records check every field with comparable field

in other table - tables are only 99% the same, both in number of records and field content.


Based on the findings many different actions need to be taken, from do nothing to run a script

to copy the record data to an error file (a very small script in fact), deleting- or adding the record in the other table etc.



I can make this using IF's.

But I also looked into CASE (Help plus previous questions)


Q1: if I would let the CASES result in a number, that I later use to trigger different actions, I understand that it would work. But then use of CASES would still be followed by many IF's (IF <variable>=1; skip to next record scriptX etc) So then I could better immedialtely start using IFs. Correct?


Q2: the use of LET (as in message 785109), could I maybe define my actions there first?


Q3 Main purpose is not the shortest script, but a structured script (visually) that is most easy to trouble shoot. What is the way to go?


Thanks for your suggestions!