how to execute my own sql by OFBiz delegator
Hello everyone, I have an entity defined as: How can l get the following sql execution result by OFBiz delegator? SELECT (quantity*price)/SUM(quantity) average FROM commodity WHERE price>100; Thanks a lot
Re: how to execute my own sql by OFBiz delegator
hi Sheng, one way could be executing the raw SQL query, like stmt = connection.createStatement(); sql = "SELECT ..."; rs = stmt.executeQuery(sql); but i would rether prefer use of ComplexAlias, you can find an example in CountFacilityInventoryByProduct.groovy qohDiffComplexAlias = new Compl