2 Replies Latest reply: Dec 21, 2017 8:59 AM by deepak thapliyal RSS

    Use different field for same selection

    deepak thapliyal

      Hi All,

      i have a date field as sess_start_dt. it is coming from A Query which is used in 4 different table. i have used Qualify keyword to change the field name so that it can work with 4 different table. but at front end i want a date filter and table name filter, which will give show data of particular field for particular data. but when i am using date filter other 3 tables are disabled. please suggest.

      my script look like this:

      ABCTable:

      load * inline

      [A

      Landing

      Base

      Base1

      CSDI

      ];

       

       

       

       

       

       

      FinalTable:

      LOAD sess_modul,

      date(Floor(sess_start_dt),'MM/DD/YYYY'),

      sess_end_dt,

      duration,

      status,

      ('Landing') as A

      FROM \\na1.ofc.loc\dfsusa\HomeDir\Z922826\Home\Data\My Documents\CSDI\jobstats.qvd (qvd)

      where left(sess_modul,11)= 'Job_CAN_NAZ' or Left(sess_modul,11)= 'Job_CAN_RSD'

      or Left (sess_modul,11)= 'Job_CAN_LED' or left (sess_modul,16)= 'Job_RSDtoSTG_OUT';

       

       

       

       

      QUALIFY *;

      UNQUALIFY A;

      FinalTable1:

      LOAD sess_modul,

      date(Floor(sess_start_dt),'MM/DD/YYYY'),

      sess_end_dt,

      duration,

      status,

      'Base' as A

          

      FROM \\na1.ofc.loc\dfsusa\HomeDir\Z922826\Home\Data\My Documents\CSDI\jobstats.qvd (qvd)

      where left (sess_modul,7)= 'Job_MAP' or Left(sess_modul,11)= 'Job_bi_item'

      or Left (sess_modul,7)= 'Job_Ref' or left (sess_modul,7)= 'Job_ref' or left(sess_modul,9)= 'CSDI_BRWR'

      or left(sess_modul,11)= 'CSDI_PRCCLS' or left(sess_modul,6)= 'Job_Bi' or left(sess_modul,7)= 'Job_map'

      or left(sess_modul,7)= 'Job_sls' or left(sess_modul,6)= 'Job_ct' or left(sess_modul,23)= 'Job_bcldb_licensee_list'

      or left(sess_modul,23)= 'Job_bcldb_stock_MasFile';

       

       

       

       

      QUALIFY *;

      UNQUALIFY A;

      FinalTable2:

      LOAD sess_modul,

      date(Floor(sess_start_dt),'MM/DD/YYYY'),

      sess_end_dt,

      duration,

      status,

      'Base1' as A

          

      FROM \\na1.ofc.loc\dfsusa\HomeDir\Z922826\Home\Data\My Documents\CSDI\jobstats.qvd (qvd)

      where left (sess_modul,7)= 'Job_rsd' or Left(sess_modul,7)= 'Job_fct'

      or Left (sess_modul,8)= 'Job_terr' or left (sess_modul,7)= 'Job_sft' or left(sess_modul,8)= 'Job_csdi'

      or left(sess_modul,21)= 'Job_ct_sales_TranFile' or left(sess_modul,11)= 'Job_pricing' or left(sess_modul,33)= 'Job_bcldb_licensee_sales_TranFile'

      or left(sess_modul,30)= 'Job_bcldb_store_sales_TranFile' or left(sess_modul,31)= 'Job_bcldb_agency_sales_TranFile'

      or left(sess_modul,31)= 'Job_bcldb_detail_sales_TranFile';

       

       

      Qualify *;

      unqualify A,

      ENV,

      sess_src_row_cnt,

      sess_rej_row_cnt,

      sess_susp_row_cnt,

      sess_load_row_cnt;

      FinalTable3:

      LOAD ENV,

      sess_modul,

      date(Floor(sess_start_dt),'MM/DD/YYYY'),

      sess_end_dt,

      duration,

      status,

      sess_src_row_cnt,

      sess_rej_row_cnt,

      sess_susp_row_cnt,

      sess_load_row_cnt,

      'CSDI' as A

       

       

      FROM \\na1.ofc.loc\dfsusa\HomeDir\Z922826\Home\Data\My Documents\CSDI\jobstats1.qvd (qvd);

       

       

       

       

      unqualify A;

      FinalTable4:

      load

      DATE1,

      JOB_COUNT_1,

      PRD_LND,

      JOB_COUNT_2,

      NPRD_LND,

      JOB_COUNT_3,

      PRD_BS,

      JOB_COUNT_4,

      NPRD_BS,

      JOB_COUNT_5,

      SAP_TRN,

      JOB_COUNT_6,

      CT_MSTR,

      JOB_COUNT_7,

      LDB_MSTR,

      JOB_COUNT_8,

      CT_TRN,

      JOB_COUNT_9,

      LDB_TRN,

      JOB_COUNT_10,

      PTC,

      JOB_COUNT_11,

      CONFORMED_PTC,

      JOB_COUNT_12,

      PTR,

      JOB_COUNT_13,

      CONFORMED_PTR,

      JOB_COUNT_14,

      RSD_LANDING,

      JOB_COUNT_15,

      RSD_BASE,

      JOB_COUNT_16,

      SF_BASE,

      JOB_COUNT_17,

      CSDI_VS_RSD,

      JOB_COUNT_18,

      RTD,

      JOB_COUNT_19,

      TM1_PPS

      FROM \\na1.ofc.loc\dfsusa\HomeDir\Z922826\Home\Data\My Documents\CSDI\jobstats2.qvd (qvd);

       

      drop Table ABCTable;