Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: sql query substr

Re: sql query substr

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Wed, 08 Feb 2006 14:51:22 -0700
Message-Id: <6.2.3.4.2.20060208145014.04973e30@pop.centrexcc.com>


The sql reference manual, format descriptors is your friend. You didn't say which Oracle version. Here is a link for Oracle 9i:

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm

At 02:32 PM 2/8/2006, Krishan Gupta wrote:
>Hello List,
>
>Look into the queries below, why the result of first two queries is
>starting with a blank space, and to get rid of this I have to substr
>from position 2 rather than 1.
>
>select substr(to_char(34.25,'99.99'),1,5) col1 from dual; --result
>is ' 34.2'

Regards

Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com



This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 08 2006 - 15:51:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US