TOPIO
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 ]*[investi ga.Pallet_ Width]*[in vestiga.Pa llet_Heigh t])*0.0005 78703704)
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
tblmasteritem.Pallet_Cube = (([investiga.Pallet_Length
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();
what units are the length, width and height in?
ASKER
inches.
And according Mr Google
1 cubic inches = 0.000578703704 cubic feet
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 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
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
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?
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
length = 48
width = 42
height = 48
OM Gang
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.
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks, glad to help.