Bonjour
j'ai un nombre du type 150000 je veux le convertir en seprateur de milliers
du type 1 500 000 comment puis je faire
merci
Bonjour
j'ai un nombre du type 150000 je veux le convertir en seprateur de milliers
du type 1 500 000 comment puis je faire
merci
soit le convertir en VARCHAR soit utiliser le paramètre NLS_NUMERIC_CHARACTERS
D : Specifies the location of the decimal point in the returned value. All format elements to the left of the D will format the integer component of the value. All format elements to the right of the D will format the fractional part of the value. The character used for the decimal character is determined by the database initialization parameter NLS_NUMERIC_CHARACTERS.
G : Specifies the location of the group separator (for example, a comma to separate thousands as in 6,734) in the returned value. The character used for the group separator is determined by the database initialization parameter NLS_NUMERIC_CHARACTERS.CDLT.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 SQL> select to_char(1500000,'9G999G999D99') from dual; TO_CHAR(15000 ------------- 1.500.000,00 SQL> SELECT replace(to_char(1500000,'9G999G999D99'),'.',' ') FROM dual; REPLACE(TO_CH ------------- 1 500 000,00
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager