NULLS LAST not supported in postgresql 8.2 or earlier

http://sourceforge.net/tracker/?func=detail&atid=879332&aid=2104835&group_id=176962
This commit is contained in:
vpj-cd 2008-09-11 04:22:13 +00:00
parent f0e1413491
commit bca6ae9e19
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ public class MPPProductPlanning extends X_PP_Product_Planning
+ " AND (S_Resource_ID IN (0,?) OR S_Resource_ID IS NULL)"; + " AND (S_Resource_ID IN (0,?) OR S_Resource_ID IS NULL)";
return new Query(ctx, Table_Name, whereClause, trxName) return new Query(ctx, Table_Name, whereClause, trxName)
.setParameters(new Object[]{Env.getAD_Client_ID(ctx), M_Product_ID, AD_Org_ID, M_Warehouse_ID, S_Resource_ID}) .setParameters(new Object[]{Env.getAD_Client_ID(ctx), M_Product_ID, AD_Org_ID, M_Warehouse_ID, S_Resource_ID})
.setOrderBy("AD_Org_ID DESC NULLS LAST, M_Warehouse_ID DESC NULLS LAST, S_Resource_ID DESC NULLS LAST") .setOrderBy("AD_Org_ID is null, AD_Org_ID DESC, M_Warehouse_ID is null,M_Warehouse_ID DESC , S_Resource_ID is null, S_Resource_ID DESC ")
.first(); .first();
} }