9 Replies Latest reply: Apr 30, 2014 9:11 AM by Marco Brechbuehl RSS

    Double data

      Hello everybody

       

      I’ve got a problem. Some data are double. I’ve some articles with more than one picturepath. Now i would like to aggregate them in the script. I only want to show these pictures with the highest picturenumber like max(bildnummer)

      How should i do that in the script?

      The actual script looks like this:

       

      Bilder_temp:

      LOAD subfield(bildname, ' ', 1) as key_Artikel ,

            bildnummer,

         

           mandid,

           bildtyp,

           anwendung,

           replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\') as servername,

           pfad,

           (replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\')&pfad) as AnzeigePfad,

           bildname,

           beschreibung,

           subfield(bildname, ' ', 1) as ArtikelNr

      FROM

      B:\Produktiv\01_Extract\03_QVD\bilder.qvd

      (qvd)

      where mandid = 'DM';

       

       

      i'm a beginner in scripting :-) Thx for your Help

       

      cheers

      marco

        • Re: Double data
          Anand Chouhan

          Check the raw QVD bilder.qvd for duplicate in another application and cross check weather there is always duplicate records in the QVD or not then go further.

          • Re: Double data
            Manish Kachhia

            Can you provide sample data in excel or in your sample qvw?

            • Re: Double data
              Fernando Tonial

              Hi, try this.

               

              Bilder_temp:
              LOAD subfield(bildname, ' ', 1) as key_Artikel ,
                    bildnummer,
              
                   mandid,
                   bildtyp,
                   anwendung,
                   replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\') as servername,
                   pfad,
                   (replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\')&pfad) as AnzeigePfad,
                   bildname,
                   beschreibung,
                   subfield(bildname, ' ', 1) as ArtikelNr
              FROM
              B:\Produktiv\01_Extract\03_QVD\bilder.qvd
              (qvd)
              where mandid = 'DM';
              
              Bilder:
              Noconcatenate
              LOAD
                   Max(bildnummer) as bildnummer,
                   key_Artikel ,
                   mandid,
                   bildtyp,
                   anwendung,
                   servername,
                   pfad,
                   AnzeigePfad,
                   bildname,
                   beschreibung,
                   ArtikelNr
              Resident Bilder_temp
              Group By
                   key_Artikel ,
                   mandid,
                   bildtyp,
                   anwendung,
                   servername,
                   pfad,
                   AnzeigePfad,
                   bildname,
                   beschreibung,
                   ArtikelNr;
              
              
              Drop Table Bilder_temp;
              
              
              
              

               

              Best Regards.

              Tonial.