5 Replies Latest reply: Sep 12, 2017 2:15 PM by Kyle Roberts RSS

    If Statement QVD

    Kyle Roberts

      Hi All,

       

      I am working with a QVD that looks like this:

      LOAD

          TX_ID,

          CM_PHY_OWNER_ID,

          CM_LOG_OWNER_ID,

          OLD_ETR_ID,

          REPOSTED_ETR_ID,

          REPOST_TYPE_C,

          IS_PREV_VOID_C

      FROM [lib://Transform QVD Path (osumc_helpstar)/ARPB_TX_VOID.qvd]

      (qvd);

       

      This is what I am trying to write using the QVD:

      ,CASE WHEN tdl.DETAIL_TYPE in (1) and (void.OLD_ETR_ID IS NULL AND void.REPOSTED_ETR_ID IS NULL)

      THEN

         cast(tdl.[ORIG_POST_DATE] - tdl.[ORIG_SERVICE_DATE] as integer)

      END as ORIGINAL_LAG_SERVICE_TO_POST

       

      **DETAIL TYPE AND THE DATES are from a different QVD that I would be Joining to