Précédent   Forum des professionnels en informatique > Bases de données > Oracle > PL/SQL
PL/SQL Forum d'entraide sur le PL/SQL
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 12/03/2007, 15h51   #1
Membre du Club
 
Inscription : mai 2004
Messages : 183
Détails du profil
Informations forums :
Inscription : mai 2004
Messages : 183
Points : 66
Points : 66
Par défaut pl/sql separateur Milliers

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
moulery est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 16h02   #2
Rédacteur/Modérateur
 
Avatar de orafrance
 
Inscription : janvier 2004
Messages : 15 861
Détails du profil
Informations personnelles :
Âge : 35

Informations forums :
Inscription : janvier 2004
Messages : 15 861
Points : 16 212
Points : 16 212
soit le convertir en VARCHAR soit utiliser le paramètre NLS_NUMERIC_CHARACTERS
orafrance est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 16h55   #3
Membre éclairé
 
Inscription : décembre 2004
Messages : 349
Détails du profil
Informations personnelles :
Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

Informations forums :
Inscription : décembre 2004
Messages : 349
Points : 367
Points : 367
Citation:
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.
Code :
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
CDLT.
taska est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 05h04.


 
 
 
 
Partenaires

Hébergement Web