Link to home
Start Free TrialLog in
Avatar of TOPIO
TOPIOFlag for United States of America

asked on

Update query is not performing a multiplication

I need to calculate the cubic feet for a box and I'm updating my table of items.

tblmasteritem.Pallet_Cube = (([investiga.Pallet_Length]*[investiga.Pallet_Width]*[investiga.Pallet_Height])*0.000578703704)

Whenever I run this query isntead of geting the Cubic Feet I get the cubic inches
It seems that either my formula is wrong or I'm doing something inclorrectly
UPDATE tblmasteritem RIGHT JOIN investiga ON tblmasteritem.Code = investiga.Code 
SET 
tblmasteritem.Length = [Box_Outside_Length], 
tblmasteritem.Width = [Box_Outside_Width], 
tblmasteritem.Height = [Box_Outside_Height], 
tblmasteritem.Weight = [Weight_per_Box], 
tblmasteritem.Cubic_Vol = [Cubic_Vol_per_box], 
tblmasteritem.Pallet_Length = [investiga.Pallet_Length], 
tblmasteritem.Pallet_Width = [investiga.Pallet_Width], 
tblmasteritem.Pallet_Height = [investiga.Pallet_Height], 
tblmasteritem.Pallet_Cube = (([investiga.Pallet_Length]*[investiga.Pallet_Width]*[investiga.Pallet_Height])*0.000578703704), tblmasteritem.HoraActualiza = Now();

Open in new window

Avatar of omgang
omgang
Flag of United States of America image

what units are the length, width and height in?
Avatar of TOPIO

ASKER

inches.
And according Mr Google
1 cubic inches = 0.000578703704 cubic feet
that is correct  ~ approximately

the values are in inches  12"

12 * 12 * 12 * 0.000578703704  = 1.000000000512  cubic ft
The math looks correct to me.  12 in. x 12 in. x 12 in. x 0.000578703704 = 1 cu. ft.

If the units for length, width and height were actually in feet instead of inches you would be getting the result you are seeing
12 ft. x 12 ft. x 12 ft. x 0.000578703704 = 1278

I don't see anything wrong with the query either.
OM Gang
Avatar of TOPIO

ASKER

Therein lies the question dear om gang the query is correct the formula is correct so why in the name of the frosted miniwheats is this not working?

Any ideas?
Not to insult but are you sure the units in table investiga are inches?  For a pallet I would imagine values such as
length = 48
width = 42
height = 48

OM Gang
Avatar of OnALearningCurve
OnALearningCurve

TOPIO,

Can you post some example values you are putting in and getting out as a result?

for example:

l=12, h=48, w=12, Result=###

Cheers,

Mark.
ASKER CERTIFIED SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, glad to help.