Re: sql query substr

  • From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
  • To: Krishan.Gupta@xxxxxxxx
  • Date: Wed, 08 Feb 2006 14:51:22 -0700

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

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'


Wolfgang Breitling
Centrex Consulting Corporation

This email has been scanned by the MessageLabs Email Security System.
For more information please visit ______________________________________________________________________

Other related posts: