| Author |
Topic  |
|
|
pille
Starting Member
15 Posts |
Posted - 05/13/2011 : 06:06:26
|
hallo all
i have a table but the result isnt what i expect. a simple sql statement select row from table gives back: select * from table
xxx 100 20110503 .25865 xxx 100 20110503 19.6163773 xxx 100 20110503 17.26035
as you can see the value .25865 should be shown as 0.25865. the last row is a number field. how do i get the leading 0 in it if nothing is written there
thank you for hints |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16745 Posts |
Posted - 05/13/2011 : 06:10:59
|
What you see now is just the way query window display the numeric value. Don't have to worry about that.
For presentation and formatting of the value, should do it in your reporting tool or front end application.
KH Time is always against us
|
 |
|
|
pille
Starting Member
15 Posts |
Posted - 05/13/2011 : 06:15:03
|
quote: Originally posted by khtan
What you see now is just the way query window display the numeric value. Don't have to worry about that.
For presentation and formatting of the value, should do it in your reporting tool or front end application.
thanks for your replay the output needs to be exported as excel file. in the excel is also without 0. the excel will be used for manual reporting (at the moment). also i dont want as less as possible human interaction. it needs to be possible to output to manipulate that the result could export directly in excel and could be used. any ideas please ?? i tried the "case" command but did not get a positive result. thanks |
 |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16745 Posts |
Posted - 05/13/2011 : 06:24:37
|
then do the formatting at the excel end, format cell something . . . .
KH Time is always against us
|
 |
|
|
pille
Starting Member
15 Posts |
Posted - 05/13/2011 : 07:30:47
|
quote: Originally posted by khtan
What you see now is just the way query window display the numeric value. Don't have to worry about that.
For presentation and formatting of the value, should do it in your reporting tool or front end application.
thanks for your replay the output needs to be exported as excel file. in the excel is also without 0. the excel will be used for manual reporting (at the moment). also i dont want as less as possible human interaction. it needs to be possible to output to manipulate that the result could export directly in excel and could be used. any ideas please ?? i tried the "case" command but did not get a positive result. thanks |
 |
|
|
pille
Starting Member
15 Posts |
Posted - 05/13/2011 : 08:02:43
|
quote: Originally posted by pille
quote: Originally posted by khtan
What you see now is just the way query window display the numeric value. Don't have to worry about that.
For presentation and formatting of the value, should do it in your reporting tool or front end application.
thanks for your replay the output needs to be exported as excel file. in the excel is also without 0. the excel will be used for manual reporting (at the moment). also i dont want as less as possible human interaction. it needs to be possible to output to manipulate that the result could export directly in excel and could be used. any ideas please ?? i tried the "case" command but did not get a positive result. thanks
for whom which are interested on the solution
select table_name.row1 as name1, table_name.row2 as name2, table_name.row3 as name3, rtrim (to_char (table_name.row4, 'B99999999999999999999990.99999999999999999'), '0') as name4 from table_name
so it works and the output is loke expected |
 |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16745 Posts |
Posted - 05/13/2011 : 09:58:05
|
TO_CHAR ? You must be in the wrong forum. This site is for Microsoft SQL Server.
KH Time is always against us
|
 |
|
|
madhivanan
Premature Yak Congratulator
India
22460 Posts |
Posted - 05/16/2011 : 09:12:26
|
Post your question at www.orafaq.com
Madhivanan
Failing to plan is Planning to fail |
 |
|
| |
Topic  |
|