2 Replies Latest reply: Sep 5, 2013 6:12 AM by Tresesco B RSS

    TABLE NOT FOUND....????

      Hi,

       

      I have a question about scheduling creation tables...

       

      With this script, i have an error:   "Table not found"  about the table RESA_AMA_TP2  when i create the table RESA_AMA.

       

      Many thanks...

       

       

       

      RESA_AMA_TEMP1:

      LOAD ...............   

      FROM

      [..\..\EXT_DATA\REC_COM\V4.00\RM\amadeus_*.xls]

      (biff, embedded labels);

       

      Qualify *;

      EXTRACTIONS_TMP:

      LOAD DISTINCT R_DateExtract

      Resident RESA_AMA_TEMP1

      Order by R_DateExtract;

      Unqualify *;

       

      Left join(EXTRACTIONS_TMP)

      load EXTRACTIONS_TMP.R_DateExtract,

      Rowno() as EXTRACTIONS_TMP.R_IDextract

      Resident EXTRACTIONS_TMP

      Order by EXTRACTIONS_TMP.R_DateExtract;

       

      Unqualify *;

      EXTRACTIONS:

      LOAD      EXTRACTIONS_TMP.R_DateExtract as  R_DateExtract,

              EXTRACTIONS_TMP.R_IDextract as R_IDextract

      Resident EXTRACTIONS_TMP;

       

       

       

      RESA_AMA_TP2:

      LOAD *    

      RESIDENT RESA_AMA_TEMP1;

      Left join load    

              R_DateExtract,

              R_IDextract

      Resident EXTRACTIONS;

       

       

      RESA_AMA:

      LOAD *    

      RESIDENT RESA_AMA_TP2;

      Left join load

              (R_IDextract)+1 as R_IDextract,

                R_NbResa as R_NbResa_Prec,

               R_NbOffres as R_NbOffres_Prec

      Resident RESA_AMA_TP2;

        • Re: TABLE NOT FOUND....????
          Stefan Wühl

          Your table gets auto-concatenated to the source table because all field names are identical using LOAD * RESIDENT ...

           

          You'll need an NOCONCATENATE LOAD prefix:

           

          RESA_AMA_TP2:

          NOCONCATENATE LOAD *    

          RESIDENT RESA_AMA_TEMP1;

           

          But take care of QV trying to link your TP2 table to the TEMP1 table, creating a syn key (i.e. you may need to drop the first at the end).

          • Re: TABLE NOT FOUND....????
            Tresesco B

            try this:

             

            ................

            '''''''''''''''''

            RESA_AMA_TP2:

            LOAD *    

            RESIDENT RESA_AMA_TEMP1;

            Left join load    

                    R_DateExtract,

                    R_IDextract,

                      1 as Junk         // this will prohibit autoconcatenate

            Resident EXTRACTIONS;

             

            Drop Table RESA_AMA_TP1

            Drop field Junk;

             

            '''''''''

            ;..........