Calculate volume

Apr 13 2014 7:01 AM

Ok, my first problem was fast and well solved So, I'll take it one step further

I have the following tables:

orders.ordernumber(PK)

orderlines.ordernumber(PK)
orderlines.orderline(PK)

orderspecs.ordernumber(PK)
orderspecs.orderline(PK)
orderspecs.specline(PK)
orderspecs.material(PK)
orderspecs.length
orderspecs.width
orderspecs.height
orderspecs.amount

materialuse.ordernumber(PK)
materialuse.orderline(PK)
materialuse.material(PK)
materialuse.volume

The volume on the specline would be length*width*height*amount

I need a function that calculates the total volume on a orderline per material. Parameters would therefor be: ordernumber,orderline,material

How does this function would look like so I could use it as a Computed Column Specification Formula?
 

Thnx in advance

 

Florian


Answers (1)