A
Arnfinn
Guest
Hello !
I have a task I do not understand how to solve.
I have 3 tables containing information. They are named:
TANK with field names TankID, Description, SG, Volume, FillGroup, Group
TANK_FILLING with field names TankID, Time, Filling
TANK_SOUNDING with field names TankID, Sounding, Volume, XCoGlo, YCoGlo, ZCoGlo, Fsm-X, Fsm-Y
I must limit the tables to a certain TANKID (ie. TB-11-0053)
I then have a given volume for my specified TankID from TANK.
In TANK_FILLING i must limitid the records to a specified time (i.e time = 95)
I will then multiply the fillingvalue (ie. 0,5) (in TANK_FILLING) with the volume in TANK and get a filled_volume. Based on this filled_volume (and tankid) I want to search the TANK_SOUNDING table and find the volume which is higher and lower than my filled_volume, retrieve the corresponding XCoGlo for these 2 volumes, calculate a interpolated value for between these to XCOGlo (which correspond/fit my filled_volume in comparison to the lower and higher volume values) and retrive this interpolated XCOGlo as the result of my query. (Similar must be done for YCOGlo and ZCOGlo).
Was this understandable? Can this be done in one simple query?
Thanks for your time and help...
I have a task I do not understand how to solve.
I have 3 tables containing information. They are named:
TANK with field names TankID, Description, SG, Volume, FillGroup, Group
TANK_FILLING with field names TankID, Time, Filling
TANK_SOUNDING with field names TankID, Sounding, Volume, XCoGlo, YCoGlo, ZCoGlo, Fsm-X, Fsm-Y
I must limit the tables to a certain TANKID (ie. TB-11-0053)
I then have a given volume for my specified TankID from TANK.
In TANK_FILLING i must limitid the records to a specified time (i.e time = 95)
I will then multiply the fillingvalue (ie. 0,5) (in TANK_FILLING) with the volume in TANK and get a filled_volume. Based on this filled_volume (and tankid) I want to search the TANK_SOUNDING table and find the volume which is higher and lower than my filled_volume, retrieve the corresponding XCoGlo for these 2 volumes, calculate a interpolated value for between these to XCOGlo (which correspond/fit my filled_volume in comparison to the lower and higher volume values) and retrive this interpolated XCOGlo as the result of my query. (Similar must be done for YCOGlo and ZCOGlo).
Was this understandable? Can this be done in one simple query?
Thanks for your time and help...