Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Load
FUEL_MASS_AFTER_SOUNDING,
FUEL_MASS_BEFORE_SOUNDING,
(FUEL_MASS_AFTER_SOUNDING-FUEL_MASS_BEFORE_SOUNDING) AS DEVIATION_AFTER_SOUNDING,
FUEL_TYPE,
IMO_NUMBER AS IMO_NO,
FROM
[mo_purch_sounding_correction_view.qvd]
(qvd);
The DEVIATION_AFTER_SOUNDING field shows value as -42000 but I want to see it in decimal -42.608 format.
How to convert this field into decimal?
ohk, got it, then you can use num() and define the format inside the brackets
Num function may help
Take a look at following
Hi
What's the logic of changing it to decimal? Can you share the qvd to check what's the data type?
or try this
Num( DEVIATION_AFTER_SOUNDING/ 1000, ' ###.##', '.', ',' )
I have two fields from two different databases .the field is common in both databases
I want the both to have same format.
DEVIATION_AFTER_SOUNDING has data like -42.000 (means 42k and . denotes thousand)
Diff vs Log survey has -42,608 (where , is decimal)
I want that both has same data-format because later I will use them to compare fields
ohk, got it, then you can use num() and define the format inside the brackets
I tried but its not working
num(DEVIATION_AFTER_SOUNDING ,'##.###')
num(Diff vs Log survey,'##.###')
Are you trying like this?
Num( SoundingCorrections.DEVIATION_AFTER_SOUNDING/ 1000, ' ###,###', ',', '.' )
I used it in the edit expression field but it s still showing the same kind of data
i misunderstood the query first.
please try this
num(DEVIATION_AFTER_SOUNDING ,'##.###')
num(Diff vs Log survey,'##.###')
and for Diff vs Log survey, if there is comma in place of dot, first replace it with dot and then perform num..
=num(Replace(Diff vs Log survey,',','.'),'##.###')