Oracle problems with number type conversion to_char
Select to_char (0.1) nums from dual;
It is observed that if the integer of a decimal number is 0 and the preceding 0 is not displayed after the string is converted, and if the preceding 0 is required, some rules are required for formatting. The example is as follows:
Select to_char (0.1, "0.9 ') nums from dual;
Let's Replace the decimal number with an integer and then look at it again. <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + c2VsZWN0IHRvX2NoYXIoMSw = "0.9 ') nums from dual;
Integers are also programmed to be of the double type.
There are many rules for to_char (x, y) and y. I will not explain them here. If you want an integer, an integer, or a decimal number, try the following method.
Example:
Select unitname, hurk, ldrk, replace (B ,":. ',': 0. ') scale, rdate from (select unitname, hurk, ldrk, concat ('1:', round (hurk/ldrk, 2) B, rdate from DYNAMICPEOPLE)