Re: sql query substr

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 ______________________________________________________________________

Other related posts: