17 Replies Latest reply: Jul 25, 2018 11:51 AM by Bala Bhaskar RSS

    Recovered lines : 0

    Mario Centeno

      I have problem when try load data show me message "Recovered lines : 0" . Sometines if load the data, others will not.


      Does anyone know why? Used Qlik Sense Desktop.

        • Re: Recovered lines : 0
          youssef belloum

          Hi,

           

          I recommend you add more details here, like the script you're using, screen shot from the error message..etc

          • Re: Recovered lines : 0
            Thiago Justen Teixeira

            Mario,

             

            It seems like your query doesn't match anything. It will be good if you could take a scrrenshot of VENTA_GC's script and share it with us. Maybe its result is 0 because of some filter made in its script.

             

            Cheers

            • Re: Recovered lines : 0
              Bala Bhaskar

              Check the data availability of the first table in Data source, tweak the SQL script.

               

              May be, if you're applying any calculations in SQL script, check that did you specified Group by Clause or not at the end.

                • Re: Recovered lines : 0
                  Mario Centeno

                  Hi!

                   

                  Actually I am calculating the average of the sales of the last 3 months of the current month and then I compare it with the actual sale


                  Maybe that calculation is affecting me the data load.

                    • Re: Recovered lines : 0
                      Bala Bhaskar

                      Can you post the, Specific script, using for this table?

                        • Re: Recovered lines : 0
                          Mario Centeno

                          This is:

                           

                           

                          [VENTA_GC_2018]:

                          LOAD

                          [COD_UNICOM],

                          [CICLO],

                          [NIS_RAD],

                          [NOMBRE_CLIENTE],

                          [CSMO_ANT],

                          [CSMO_ACTUAL],

                          [DESC_TAR];

                          SELECT b.cod_unicom,b.ciclo,b.nis_rad,c.nom_cli || ' ' || c.ape1_cli|| ' ' || c.ape2_cli AS NOMBRE_CLIENTE,

                          //--SubQuery Csmo_antes--

                              avg(NVL((Select round(sum(hf.csmo_kwh)/3) as csmo

                              FROM bi_billing hf

                              WHERE hf.nis_rad = b.nis_rad

                              and to_char(hf.fecha_proceso,'YYYYMM')  between TO_CHAR(add_months(b.fecha_proceso,-4),'YYYYMM')

                              and TO_CHAR(add_months(b.fecha_proceso,-2),'YYYYMM') ),0)) csmo_ant,sum(b.csmo_kwh) Csmo_actual,t.desc_tar

                          from bi_billing b, bi_tarifas t, BI.MVSUMCLIENTES c

                          where b.CO_CONCEPTO IN ('CC221','CC250','CC270','CC280','CC320','CC321')

                          AND B.NIS_RAD = C.NIS_RAD

                          AND b.TIP_REC IN ('TR010','TR014')

                          AND b.cod_tar = t.cod_tar

                          //AND b.cod_unicom = 4111

                          AND T.DEMANDA IN ('GRANDES','MEDIANAS')

                          //AND ROWNUM <10

                          //AND B.nis_Rad in(3105136)

                          AND b.fecha_proceso >=  To_date('20180701','YYYYMMDD') and b.fecha_proceso <= To_date('20180723','YYYYMMDD')

                          group by b.cod_unicom,b.ciclo, b.nis_rad,b.nis_rad,t.desc_tar,c.nom_cli,c.ape1_cli,c.ape2_cli;

                            • Re: Recovered lines : 0
                              Thiago Justen Teixeira

                              Mario,

                               

                              Esse filtro aqui deve estar resumindo sua consulta a 0.

                               

                              AND b.fecha_proceso >=  To_date('20180701','YYYYMMDD') and b.fecha_proceso <= To_date('20180723','YYYYMMDD')


                              Verifique a possibilidade de comentar esta linha apenas para testar se a minha suspeita se confirma.


                              Abs e Sucesso!!

                              • Re: Recovered lines : 0
                                Bala Bhaskar

                                I just modified the script a bit, what are the values you are seeing for csmo_ant field, when you execute the Query?

                                 

                                [VENTA_GC_2018]:

                                LOAD

                                [COD_UNICOM],

                                [CICLO],

                                [NIS_RAD],

                                [NOMBRE_CLIENTE],

                                [CSMO_ANT],

                                [CSMO_ACTUAL],

                                [DESC_TAR];

                                 

                                SELECT

                                b.cod_unicom,b.ciclo,b.nis_rad,

                                c.nom_cli || ' ' || c.ape1_cli|| ' ' || c.ape2_cli AS NOMBRE_CLIENTE,

                                 

                                //--SubQuery Csmo_antes--

                                 

                                avg(NVL(

                                (Select round(sum(hf.csmo_kwh)/3) as csmo

                                    FROM bi_billing hf

                                    WHERE hf.nis_rad = b.nis_rad and

                                    to_char(hf.fecha_proceso,'YYYYMM')  between

                                    TO_CHAR(add_months(b.fecha_proceso,-4),'YYYYMM') and

                                    TO_CHAR(add_months(b.fecha_proceso,-2),'YYYYMM') ),0)) as csmo_ant,

                                sum(b.csmo_kwh) as Csmo_actual,

                                t.desc_tar

                                from bi_billing b, bi_tarifas t, BI.MVSUMCLIENTES c

                                where b.CO_CONCEPTO IN ('CC221','CC250','CC270','CC280','CC320','CC321')

                                AND B.NIS_RAD = C.NIS_RAD

                                AND b.TIP_REC IN ('TR010','TR014')

                                AND b.cod_tar = t.cod_tar

                                //AND b.cod_unicom = 4111

                                AND T.DEMANDA IN ('GRANDES','MEDIANAS')

                                //AND ROWNUM <10

                                //AND B.nis_Rad in(3105136)

                                AND b.fecha_proceso >= To_date('20180701','YYYYMMDD') and

                                        b.fecha_proceso <= To_date('20180723','YYYYMMDD')

                                group by b.cod_unicom,b.ciclo, b.nis_rad,b.nis_rad,t.desc_tar,c.nom_cli,c.ape1_cli,c.ape2_cli;