|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
pl/sql format mask
I have declared the following variables:
variable name: city_population value: 55000 data type: Number variable name: statehood_population value: 07/10/1890 data type: Date I want to display city_population as 55,000 and statehood_population as July 10, 1890 using DBMS_OUTPUT. How do I use the format mask to do this? Should the format mask be used when declaring the variables or when displaying them? thanks!! |
|
#2
|
|||
|
|||
|
For the date one, please try:
select to_char(sysdate,'Month DD,YYYY') from dual Cheers, Dan |
|
#3
|
|||
|
|||
|
For the number conversion, please try:
select to_char(1000000, '99G999G999') from dual; Cheers, Dan |
|
#4
|
|||
|
|||
|
For number conversion you can also use:
SELECT to_char(city_population,'99,999,999') from dual; |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > pl/sql format mask |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|