5 Replies Latest reply: Jun 17, 2014 10:47 AM by christian juillard RSS

    Left keep function

      Hello Experts

       

      I used a "Left keep" function to link the two tables in a way that when datum_auftrag <> null, values are shown. if datum_auftrag = null,  all other values are excluded. Not only in table "job" but also the fields that are linked from table "jleistg".

       

      SQL SELECT "job_nummer",

          jobnr,

          "datum_auftrag",

          Year ("datum_auftrag") as Jahr,

          Month ("datum_auftrag") as Monat,

          jobkategorie

      FROM EASY.job where "datum_auftrag" is not null;

       

      LEFT KEEP (job)

       

      load *, [auf_kurs] * [auf_wert] / 100 as [Auftragswert];

       

      SQL SELECT "auf_datum",

          "auf_fw",

          "auf_kurs",

          "auf_wert",

          bez as Leistungstext,

          jobnr,

          "auf_anzahl",

          ltyp,

          storniert,

          optional,

          lartnr 

      FROM EASY.jleistg where storniert = 0 and optional = 0 and ltyp <> 0;

       

      Now I would like to use another table with a selection criteria to exclude all linked vaues in the two tables above:

       

      SQL SELECT bez as Jobkriterium,

          beznr as Jobkritnr

      FROM EASY.divbez where Jobkriterium <> 'Internes Projekt';

       

      Where do I have to set the "Left keep" keep in this case? I do not seem to get it right...

       

      Thank you so much for your help...