[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Update query is not performing a multiplication

Posted on 2008-06-13
9
Medium Priority
?
322 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

649 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