SQL Question - Number formatting for report
From: George Dimopoulos <george_at_cheos.ubc.ca>
Date: Wed, 19 Jan 2000 09:52:29 -0800
Message-ID: <864tjt$p$1_at_nntp.itservices.ubc.ca>
[Quoted] Using Oracle 8
Date: Wed, 19 Jan 2000 09:52:29 -0800
Message-ID: <864tjt$p$1_at_nntp.itservices.ubc.ca>
[Quoted] Using Oracle 8
Have a field of number(12,4) which I would like to print out on a report [Quoted] based on following format criteria
If the value is less then 1, then print a zero infront of decimal
ie .12 should print as 0.12
If the value is a whole integer (no decimal value) then don't print decimal or zero
[Quoted] ie 1 should print as 1
If the value is greater then 1 and has decimal values then print as is
ie 23.333 should print as 23.333
any ideas on how to do this using to_char(...., {format})?
thx in advance.
Please email me and I will post results.
-- George Dimopoulos george_at_cheos.ubc.caReceived on Wed Jan 19 2000 - 18:52:29 CET