Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to map two fuel types FIELD from 2 tables, Sounding correction and Summary depending on the sulphur content of the sounding correction table.How can I map these two tables using mapping function and apply map with conditional expression
| Sounding Correction.Fuel Type | Sounding Correction.Sulphur Content | Summary.Fuel Type |
| DMA | <.01 | LSDO |
| DMB | <.01 | LSDO |
| DMC | <.01 | LSDO |
| DMA | >.01 | HSDO |
| DMB | >.01 | HSDO |
| DMC | >.01 | HSDO |
| RMA | <.01 | ULSFO |
| RMG | <.01 | ULSFO |
| RMD | <.01 | ULSFO |
| RMA | >.01 | HSFO |
| RMG | >.01 | HSFO |
| RMD | >.01 | HSFO |
If (Sounding Correction.Fuel Type = ‘DM*’) and (Sounding Correction.Sulphur Content)
Greater than 0.1 , Summary.Fuel Type = ‘HSDO’
Or else ‘LSDO’
If (Sounding Correction.Fuel Type = ‘RM*****’) and (Sounding Correction.Sulphur Content)
Greater than 0.1 then (Summary.Fuel Type) = ‘HSFO’
Or else ‘ULSFO’
map1:
mapping load
key,value
from ......
where key is the value you are looking for
and value will be the returned value
have a look in QV documention at
8 Introduction to loading data
Using a mapping table
because I am trying to connect two tables..these tables have been joined already previously but I was getting redundant data...

So why not using the expression, you'll get the desired result.
Please try it once
I am not getting the expression even if I am using it because I want to see values against rmk 700 which is HSFO but its not reflected..if I can map rmk with the exact code then I think the redundant data can be avoided:
if(WildMatch(FUEL_TYPE, 'DM*') and [SULPHUR_CONTENT] = '.1','HSDO',
if(WildMatch(FUEL_TYPE, 'DM*') and [SULPHUR_CONTENT] <> '>.1','LSDO',
if(WildMatch(FUEL_TYPE,'RM****') and [SULPHUR_CONTENT] = '>.1', 'HSFO','ULSFO')))
Result is erroneous: You can see only the highlighted row is the required data..but I have several rows of redundant data...and also it is not ULSFO

ok, so if it's RMK 700 , then you need HSFO in resultant column?
RMK 700 if has sulphur content less than .1 will be ULSFO or HSFO.But as the the two columns are not mapped properly u can see there are redundant data...all the columns are showing duplicate data...which is not correct...only rmk 700 which has hsfo has the correct data which is -42.
u can see the other fields are showing redundan data, apart from this highlighted field no other values should come

Hi
What are your dimensions?