Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use the max() to load the max ratio, which is decimal number. I am having problems with max() when querying AS400 file. Here is my code to pull data from AS400. I also tried to load data and then try to pull max value from a resident table, but that will not work either. Can someone please advise how to use Max() function for number values.
Y40_ALL:
LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO ;
SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00
GROUP BY CUSTDO,YCPLDO, MAARDO;
Hi Karen,
Try this:
Y40_ALL:
LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO
GROUP BY CUSTDO,YCPLDO ;
SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00 ;
/Johan
Hi Karen,
Try this:
Y40_ALL:
LOAD CUSTDO AS SALES_CUST, YCPLDO, MAX(MAARDO) AS RATIO
GROUP BY CUSTDO,YCPLDO ;
SQL SELECT CUSTDO, MAARDO, YCPLDO FROM S10A5929.USSOMEA.SMDOP00 ;
/Johan
Johan,
Thank you for the quick response. I tried your sugguest and that resolved my issue. Thank you so much!!!