Handling multiple spaces in a column [message #300630] |
Sat, 16 February 2008 23:12 |
dr.s.raghunathan
Messages: 540 Registered: February 2008
|
Senior Member |
|
|
i have stored "a b xyz d" in particular column.
When i used it in report displayed as "a b xyz d".
mulitple space characters are getting shrinked to single space character. i want to store multiple space characters as data. how to do it?
[EDITED by LF]
As a new user of the OraFAQ Forum, perhaps you should first test your skills in the "Test" forum (the last one in the forum list). Check what BBcode means and how to use it in order to improve readability.
For example, your message might look like this (and other forum members might easier understand what you meant to say); I'll use [pre] tags to preserve formatting:
Quote: |
i have stored a b xyz d in particular column. When i used it in report displayed as a b xyz d
| See the difference?
Next time, please, format it yourself.
[MERGED by LF]
[Updated on: Mon, 18 February 2008 00:33] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: handling multiple spaces in coloumn [message #300680 is a reply to message #300654] |
Sun, 17 February 2008 14:57 |
|
Barbara Boehmer
Messages: 9102 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
If you are running SQL from SQL*Plus or one of many other things, then Oracle preserves the spaces. However, when using Apex, by default, it replaces all multiple spaces with single spaces. However, there are some workarounds. For example, if you are creating your report from a sql query, you can replace each space with   to preserve the spaces as non-breaking spaces. Here is an example:
select replace("TEST_TAB"."TEST_COL",' ',' ') as "TEST_COL"
from "TEST_TAB" "TEST_TAB"
|
|
|
Re: handling multiple spaces in coloumn [message #300722 is a reply to message #300680] |
Sun, 17 February 2008 23:17 |
dr.s.raghunathan
Messages: 540 Registered: February 2008
|
Senior Member |
|
|
Sir,
Thank you very much for the excellent reply. I was in need of this type of solution for a quite longer time. It has given enormous joy to put an end to my search. I like to know is it possible to use   in lpad and rpad functions. If so it reduceds some of my research. I am very much newbies on using orafaq. I am sorry if i make mistake on my expression.
urs
dr.s.raghu
|
|
|
|
|
|
|