Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jmarinesc
Contributor III
Contributor III

combine result fields syntax

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

1 Solution

Accepted Solutions
Gysbert_Wassenaar

I have no idea what you're trying to do, but there were some errors in your if statement. Make sure the fields remision and vnatural exist with those exact, lowercase names. Then try this:

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



talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

I have no idea what you're trying to do, but there were some errors in your if statement. Make sure the fields remision and vnatural exist with those exact, lowercase names. Then try this:

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



talk is cheap, supply exceeds demand
jmarinesc
Contributor III
Contributor III
Author

Thanks Gysbert It Works!