anchor.diff:        LBuilder.AppendFormat('(%0:S)', [FOwner.FHavingCriterias[i]]);
       end;
   
  -    if FOwner.FOrderByCriterias.Count > 0 then
  -    begin
  -      LBuilder.AppendLine.Append(' ORDER BY ' + FOwner.FOrderByCriterias.DelimitedText);
  +
  +    for i := 0 to Owner.FOrderByCriterias.Count - 1 do
  +    begin
  +      if i = 0 then
  +        LBuilder.AppendLine.Append(' ORDER BY ')
  +      else
  +        LBuilder.Append(',');
  +
  +      LBuilder.Append(Owner.FOrderByCriterias[i]);
       end;
   
       for i := 0 to FOwner.FUnions.Count - 1 do
  
positive.code:     if FOwner.FTop.FEnabled then
        FOwner.AppendTop(LBuilder);
  
      LBuilder.Append(Owner.FColumns.DelimitedText);
  
      LBuilder.AppendLine.Append(' FROM ' + Owner.FTable.ToString);
  
  
negative.code:       LBuilder.Append('(' + FOwner.FWhereCriterias[i] + ')');
      end;
  
  
      for i := 0 to Owner.FGroupByCriterias.Count - 1 do
      begin
        if i = 0 then
          LBuilder.AppendLine.Append(' GROUP BY ')
        else
          LBuilder.Append(',');
  
        LBuilder.Append(Owner.FGroupByCriterias[i]);
      end;
  
      for i := 0 to FOwner.FHavingCriterias.Count - 1 do
  