1. Registered User
Join Date
Jan 2010
Posts
6

I have a table that contains tank data...(increment factors)

gauge - contains floating point data in 0.01 feet - primary key
multiplier - contains floating point data in volume per gauge
index - contains floating point data in volume at gauge

gauge - there is no gauge for every 0.01 feet...it is a reference point as follows:
gauge = 0.0 = no multiplier = 44.1345 index volume
gauge = 0.08 = 8.9035 = 115.7775

what this means is that from 0.0 to 0.8 you multiply 8.9035 times the number of gauge values then add it to the 0.0 index volume (44.1345 in this case) to get the actual volume at any of the intermediate gauges...

example:
gauge = 0.07
gauge value = (0.07 - 0.0) * 100 = 7
index volume @ 0.0 = 44.1345
7 * 8.9035 = 62.3245
44.1345 + 62.3245 = 106.459

I would like a query that will take an input gauge, calculate the gauge value, then calculate the index volume...!

The table can be modified if you think that a design change would be beneficial...!

Can anyone shed some light on this one...?

2. Registered User
Join Date
Mar 2004
Posts
480
look at the use of CASE, you will probably need a couple of separate conditions to do your calculations.

3. Registered User
Join Date
Jan 2010
Posts
6
Thanks...I have a look...!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•