[AccessD] Access rounding scenario

Stuart McLachlan stuart at lexacorp.com.pg
Mon Aug 22 21:58:00 CDT 2011


No.  You need something like:

Select  Item, 
         Amount,
        Amount * (Select Amount from details where Item = '"Transport") /(Select Sum(Amount)
                        From Details Where Item <> "Transport")  AS TptCharge

>From Details

Where Item <> "Transport"


The amount is proportional to the Item Cost.   If the cost of one item is 60 percent of the total 
cost, that item wears 60^ of the transport cost.

-- 
Stuart

On 22 Aug 2011 at 22:30, Arthur Fuller wrote:

> So the components are (air code):
> 
> Select Amount
> From Details
> Where Item = "Transport" / (Select Count(*) Where Item <> "Transport")
> As LeveledTransport
> 
> I didn't try to run it but that should be close to what you need. Add
> that as a calculated column in your query.
> 
> Arthur
> 
> On Mon, Aug 22, 2011 at 10:13 PM, Lawrence Mrazek
> <lmrazek at lcm-res.com>wrote:
> 
> > Yes, a bit screwy when you think of it this way, but these are the
> > specs ... they want to see the transport charge with the material
> > line item, instead of a line item by itself.
> >
> > Thanks to all for  the feedback!
> >
> > Larry Mrazek
> > lmrazek at lcm-res.com
> > ph. 314-496-1645
> >
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 






More information about the AccessD mailing list