Hi Rupinder,

  Something like this executed from a beanshell file will bring the
distinct statusIds from the OrderHeader entity.

   orderBy = UtilMisc.toList("statusId");
   findOpts = new EntityFindOptions();
   findOpts.setDistinct();
   fieldsToSelect = UtilMisc.toList("statusId");
   exprs.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, null));
   condition = new EntityConditionList(exprs, EntityOperator.AND);
   statusList = delegator.findByCondition("OrderHeader", condition,
null, fieldToSelect, orderBy, findOpts);

  Regards,
Alexandre Gomes

On 6/28/06, Rupinder Singh Mazara <[EMAIL PROTECTED]> wrote:
hi all

  how can i carry out a "select distinct status_id from order_header
order by status_id "
 via the delegator !

 thanks



Reply via email to