2 Replies Latest reply: Nov 28, 2012 2:29 PM by Jaime Marines RSS

    combine result fields syntax

    Jaime Marines
      
      

       

      Hello all !

       

      Below my script after concatenate and INNER two tables....my question is: If I can type something like:

       

              //,if((maxstring(remision)=minstring(remision))and if(max(vnatural)<>min(vnatural),-8)) as "SI Mach vnatural Different?"

       

      or what is the best way to obtain another mixed field (-8).... because I got syntax error...and I need to choose combine result fields.....

      ( Where can i find some syntax ex like those expressions )

       

      TK A LOT !

       

      //******************INNER JOIN*************************
      INNER JOIN (TablaA)
      LOAD*
      WHERE "NoMatch"
        OR  "SiMatch"
        OR "Duplicadas"
        OR  "DifEstacion"
        OR  "DifLitros"
        OR "DifLocal"
        OR "IgDesc"
      ;
      LOAD
      INVREMISION
      //,if(max(INVREMISION)<>min(INVREMISION),-5) as "No Match"
      ,if(count(INVREMISION)<<2 ,-1)as "NoMatch"
      ,if(count(INVREMISION)>>2,-2)as "SiMatch"
      ,if(count(INVREMISION)>2,-3) as "Duplicadas"
      ,if(maxstring(DESIGNADOR)<>minstring(DESIGNADOR),-4) as "DifEstacion"
      ,if(max(CANTIDAD)<>min(CANTIDAD),-5)as "DifLitros"
      ,if(maxstring(LOCALIDAD)<>minstring(LOCALIDAD),-6)as "DifLocal"
      ,if(maxstring(DESCRIPTION)= minstring(DESCRIPTION),-7)as "IgDesc"
      //,if((maxstring(remision)=minstring(remision))and if(max(vnatural)<>min(vnatural),-5)) as "SI Mach vnatural Different?"
      RESIDENT TablaA
      GROUP BY INVREMISION;

      STORE TablaA INTO C:\Users\jmarinesc\Downloads\SIAMCO\01_DATA\SQL\QVD\EISLK1JJOINA.qvd; 

       

      Best Regards

      James Marines