Home » SQL & PL/SQL » SQL & PL/SQL » Formatting strings
Formatting strings [message #192884] Thu, 14 September 2006 01:34 Go to next message
rajaguru_t
Messages: 7
Registered: September 2006
Location: India
Junior Member

Hi ,

Please tell me how do I do the following .
I may get '1234', '123', '1%' in the result.
But I want them to be '1234' if 1234 is selected.
'0123' if '123' is selected.
'001%' if '1%' is selected.

They are strings.

Thanks,
Raj.
Re: Formatting strings [message #192885 is a reply to message #192884] Thu, 14 September 2006 01:40 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Left pad your string with zeros, up to 4 places (regarding your example).
Re: Formatting strings [message #192903 is a reply to message #192885] Thu, 14 September 2006 03:14 Go to previous message
rajaguru_t
Messages: 7
Registered: September 2006
Location: India
Junior Member

Thank you very much
Previous Topic: Error when connecting to Oracle database
Next Topic: ORA-00907: missing right parenthesis
Goto Forum:
  


Current Time: Sat Dec 10 18:52:16 CST 2016

Total time taken to generate the page: 0.09152 seconds