4 Replies Latest reply: Jan 31, 2008 2:30 PM by 796254 RSS

    object Construction... based on an SQL question???

    807601
      I'm new on these...


      **SQL...**

      Maybe the question will be stupid, but this is my doubt, I know how to construct an object based on a table... but what happens when it is a combination of tables... or I contruct the object based on the results I will get from the run. or I have to contruct an object for each table I have to use from the FROM.

      **SQL EXPLANATION....**

      The SQL when run will tell the discrepancies between to Platforms,
      BRITE Platform and AMDOCS Platform, when the Subscriber is active in AMDOCS but in BRITE Platform is inactive or the fields SU_INITIAL_ACTIVATION_DATE or SU_TYPE are null, it will show the subscriber in the BRITE Platform that needs to be corrected.

      SELECT b.subscriber_no,
      b.min_num AMDOCS_min,
      s.SU_MIN BRITE_MIN,
      b.sub_status AMDOCS_status,
      s.SU_STATUS brite_status,
      b.Init_activation_date Amdocs_actv,
      s.SU_INITIAL_ACTIVATION,
      s.SU_ACTIVATION
      FROM brite_mtm@pctiol.world b,
      SJU.DC_SUBSCRIBER S
      WHERE b.subscriber_no = s.SU_SUBNUM
      AND b.type_customer = 'PREPAID'
      AND B.INIT_ACTIVATION_DATE = TRUNC(SYSDATE-1)
      AND     (s.su_status <> 'A'
      OR     s.SU_INITIAL_ACTIVATION IS NULL
      OR     s.SU_TYPE is null);