XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Accepted
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 7.0.x
    • Component/s: Documentation
    • Labels:

      Description

      Useful when doing a FULL OUTER, LEFT OUTER, RIGHT OUTER, etc. Some pairs of records are from the OUTER set where one side is empty.

      New MATCHED patterns LEFT and RIGHT can be used within the transform of a JOIN or DENORMALIZE to detect whether the LEFT or RIGHT values where matched rows within the datasets, or are "default" empty rows because only the other side matched.

      Example usage:

      jrec := RECORD,MAXLENGTH(100)
      UNSIGNED1 i;
      STRING3 lstr;
      STRING3 rstr;
      INTEGER1 c;
      STRING label;
      BOOLEAN ml := false;
      BOOLEAN mr := false;
      END;

      jrec xfm(jrec l, jrec r, STRING lab) := TRANSFORM
      SELF.i := l.i;
      SELF.lstr := l.lstr;
      SELF.rstr := r.rstr;
      SELF.c := IF(MATCHED(l), l.c+1, r.c-1);
      SELF.label := lab;
      SELF.ml := MATCHED(l);
      SELF.mr := MATCHED(r);
      END;

      myjoin := JOIN(lhs, rhs, match(LEFT, RIGHT), xfm(LEFT, RIGHT, 'JOIN'), INNER);

        Attachments

          Activity

            People

            • Assignee:
              jamesdefabia Jim DeFabia
              Reporter:
              afishbeck Anthony Fishbeck
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: