Solved

Update query is not performing a multiplication

Posted on 2008-06-13
9
318 Views
Last Modified: 2013-11-27
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

0
Comment
Question by:TOPIO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 28

Expert Comment

by:omgang
ID: 21783205
what units are the length, width and height in?
0
 
LVL 10

Author Comment

by:TOPIO
ID: 21783213
inches.
And according Mr Google
1 cubic inches = 0.000578703704 cubic feet
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21783242
that is correct  ~ approximately

the values are in inches  12"

12 * 12 * 12 * 0.000578703704  = 1.000000000512  cubic ft
0
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
LVL 28

Expert Comment

by:omgang
ID: 21783245
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
0
 
LVL 10

Author Comment

by:TOPIO
ID: 21783253
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?
0
 
LVL 28

Expert Comment

by:omgang
ID: 21783268
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
0
 
LVL 10

Expert Comment

by:OnALearningCurve
ID: 21784607
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.
0
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 21789570
As you are using Property names (Length, Width, Height)  for field names, you may get some cross talk.  If you can try using the same Name as the source - [Box_Outside_Length] in lieu of Length
0
 
LVL 44

Expert Comment

by:GRayL
ID: 21835042
Thanks, glad to help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question