Friday, September 10, 2010   
 Search   
 

http://www.foxfirereporting.com
Register  Login  
Forums  
      
 Forums    
SearchForum Home
  Support  Foxfire! 8+ Support  problem with gr...
 problem with grouping
 
 5/23/2008 12:12:09 PM
patricks
16 posts


problem with grouping

I am attempting to sort on two fields, first one then the other.  When I add two fields in the "sort and group results" tab, it doesnt seem to want to sort properly.  When looking at the SQL code, it seems as if it is using one field for both sort requests...  for example, this one looks like it should be "ORDER BY 1,6"  but it comes out 6,6 instead.   If I manually edit the SQL and change it to 1,6, it works the way I want it to.

here is the sql

SELECT ALL;
        ML.DATE                        AS DATE_M,;
        ML.SA_NAME                     AS SA_NAME_M,;
        ML.SA_SS                       AS SA_SS_M,;
        ML.CITY                        AS CITY_M,;
        ML.ST                          AS ST_M,;
        ML.SPON_NAME;
  FROM "ML" ML;
  INTO CURSOR JAPPS;
  WHERE (ML.DATE BETWEEN {^2008-03-01} AND {^2008-05-04});
  ORDER BY 6, 6

** (ORDER BY with field names)...
** ORDER BY DATE_M, ST_M

 

 5/23/2008 12:13:19 PM
patricks
16 posts


Re: problem with grouping

My bad, it should say "problem with ORDER by"

 patricks wrote
  ORDER BY 6, 6

** (ORDER BY with field names)...
** ORDER BY DATE_M, ST_M

 5/23/2008 12:48:46 PM
patricks
16 posts


Re: problem with order by

I just built a query which ended up with the following SQL:

SELECT ALL;
        Orders.DATE                    AS DATE_O,;
        Orders.ORD_NO                  AS ORD_NO_O,;
        Lines.ITEM                     AS ITEM_L,;
        Lines.DESC                     AS DESC_L,;
        Lines.QUANT                    AS QUANT_L,;
        Orders.SA_SS                   AS SA_SS_O,;
        Orders.SA_NAME                 AS SA_NAME_O,;
        Orders.ST                      AS ST_O;
  FROM "ML-ORDER" Orders,;
        "ML-LINE" Lines;
  INTO CURSOR JLINESALL;
  WHERE (Orders.ORD_NO = Lines.ORD_NO) AND (ORDERS.DATE>={^2007-09-01};
     AND LINES.ITEM BETWEEN "CARM" AND "CARMX");
  ORDER BY 8

** (ORDER BY with field names)...
** ORDER BY SA_SS_O

 

Which should be ORDER BY 6.  When I went to the "Select Data Items" tab, and moved Orders.SA_SS down to position 8, the SQL corrected itself to say BY 6, and didnt change the position of the Orders.SA_SS line... but ran fine... when I moved the line back to position 6, the SQL code stayed correct and still runs fine....

I am running build 8.1.559

 

 5/25/2008 1:16:13 PM
AndrewM
131 posts
www.aksel.com
5th


Re: problem with order by
Thanks for the note Patrick - this was something that was just noted in build 559 and has been fixed in build 560 which is available from the downloads page.

Please download the update and let me know if you are still seeing that problem.

Thanks
 5/27/2008 7:41:50 AM
patricks
16 posts


Re: problem with order by
That fixed it, thank you. :)

  Support  Foxfire! 8+ Support  problem with gr...
   
SearchSearch  Forum HomeForum Home     
 Links    
   
  
Downloaded from DNNSkins.com