dbTalk Databases Forums  

Replacing Strings

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Replacing Strings in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
exec@chicagorsvp.com
 
Posts: n/a

Default Replacing Strings - 09-11-2008 , 12:17 PM






Hi,

We have some messages stored in a column in this format: AA|BB|CC|DD

What we want is to replace the vertical bars with a CHR(10) for line
feed, but have 3 leading spaces.

Everything I try seems to only indent the first item 3 characters.
Even I try to replace it with ' ' || CHR(10) and it ignores the
spaces.......

What we want is:
AA
BB
CC

Ideas anyone?

Reply With Quote
  #2  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 01:41 PM







<exec (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f7a2...oglegroups.com...
Quote:
Hi,

We have some messages stored in a column in this format: AA|BB|CC|DD

What we want is to replace the vertical bars with a CHR(10) for line
feed, but have 3 leading spaces.

Everything I try seems to only indent the first item 3 characters.
Even I try to replace it with ' ' || CHR(10) and it ignores the
spaces.......

What we want is:
AA
BB
CC

Ideas anyone?
replace(column,'|',chr(10))

Regards
Michel




Reply With Quote
  #3  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 01:41 PM




<exec (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f7a2...oglegroups.com...
Quote:
Hi,

We have some messages stored in a column in this format: AA|BB|CC|DD

What we want is to replace the vertical bars with a CHR(10) for line
feed, but have 3 leading spaces.

Everything I try seems to only indent the first item 3 characters.
Even I try to replace it with ' ' || CHR(10) and it ignores the
spaces.......

What we want is:
AA
BB
CC

Ideas anyone?
replace(column,'|',chr(10))

Regards
Michel




Reply With Quote
  #4  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 01:41 PM




<exec (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f7a2...oglegroups.com...
Quote:
Hi,

We have some messages stored in a column in this format: AA|BB|CC|DD

What we want is to replace the vertical bars with a CHR(10) for line
feed, but have 3 leading spaces.

Everything I try seems to only indent the first item 3 characters.
Even I try to replace it with ' ' || CHR(10) and it ignores the
spaces.......

What we want is:
AA
BB
CC

Ideas anyone?
replace(column,'|',chr(10))

Regards
Michel




Reply With Quote
  #5  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 01:41 PM




<exec (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f7a2...oglegroups.com...
Quote:
Hi,

We have some messages stored in a column in this format: AA|BB|CC|DD

What we want is to replace the vertical bars with a CHR(10) for line
feed, but have 3 leading spaces.

Everything I try seems to only indent the first item 3 characters.
Even I try to replace it with ' ' || CHR(10) and it ignores the
spaces.......

What we want is:
AA
BB
CC

Ideas anyone?
replace(column,'|',chr(10))

Regards
Michel




Reply With Quote
  #6  
Old   
exec@chicagorsvp.com
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 02:01 PM



On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
e... (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f... (AT) m45g2000hsb (DOT) googlegroups.com...
| Hi,
|
| We have some messages stored in a column in this format: *AA|BB|CC|DD
|
| What we want is to replace the vertical bars with a CHR(10) for line
| feed, but have 3 leading spaces.
|
| Everything I try seems to only indent the first item 3 characters.
| Even I try to replace it with ' * ' || CHR(10) and it ignores the
| spaces.......
|
| What we want is:
| * AA
| * BB
| * CC
|
| Ideas anyone?

replace(column,'|',chr(10))

Regards
Michel
But what about the leading spaces? Those disappear if I use replace
or translate or even LPAD........


Reply With Quote
  #7  
Old   
exec@chicagorsvp.com
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 02:01 PM



On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
e... (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f... (AT) m45g2000hsb (DOT) googlegroups.com...
| Hi,
|
| We have some messages stored in a column in this format: *AA|BB|CC|DD
|
| What we want is to replace the vertical bars with a CHR(10) for line
| feed, but have 3 leading spaces.
|
| Everything I try seems to only indent the first item 3 characters.
| Even I try to replace it with ' * ' || CHR(10) and it ignores the
| spaces.......
|
| What we want is:
| * AA
| * BB
| * CC
|
| Ideas anyone?

replace(column,'|',chr(10))

Regards
Michel
But what about the leading spaces? Those disappear if I use replace
or translate or even LPAD........


Reply With Quote
  #8  
Old   
exec@chicagorsvp.com
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 02:01 PM



On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
e... (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f... (AT) m45g2000hsb (DOT) googlegroups.com...
| Hi,
|
| We have some messages stored in a column in this format: *AA|BB|CC|DD
|
| What we want is to replace the vertical bars with a CHR(10) for line
| feed, but have 3 leading spaces.
|
| Everything I try seems to only indent the first item 3 characters.
| Even I try to replace it with ' * ' || CHR(10) and it ignores the
| spaces.......
|
| What we want is:
| * AA
| * BB
| * CC
|
| Ideas anyone?

replace(column,'|',chr(10))

Regards
Michel
But what about the leading spaces? Those disappear if I use replace
or translate or even LPAD........


Reply With Quote
  #9  
Old   
exec@chicagorsvp.com
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 02:01 PM



On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
e... (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f... (AT) m45g2000hsb (DOT) googlegroups.com...
| Hi,
|
| We have some messages stored in a column in this format: *AA|BB|CC|DD
|
| What we want is to replace the vertical bars with a CHR(10) for line
| feed, but have 3 leading spaces.
|
| Everything I try seems to only indent the first item 3 characters.
| Even I try to replace it with ' * ' || CHR(10) and it ignores the
| spaces.......
|
| What we want is:
| * AA
| * BB
| * CC
|
| Ideas anyone?

replace(column,'|',chr(10))

Regards
Michel
But what about the leading spaces? Those disappear if I use replace
or translate or even LPAD........


Reply With Quote
  #10  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Replacing Strings - 09-11-2008 , 02:49 PM




<exec (AT) chicagorsvp (DOT) com> a écrit dans le message de news: d5102e08-47e1-433b-b144-913764321d16...oglegroups.com...
On Sep 11, 1:41 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
e... (AT) chicagorsvp (DOT) com> a écrit dans le message de news: adee164f-6729-416f-8eca-35556d30f... (AT) m45g2000hsb (DOT) googlegroups.com...
| Hi,
|
| We have some messages stored in a column in this format: AA|BB|CC|DD
|
| What we want is to replace the vertical bars with a CHR(10) for line
| feed, but have 3 leading spaces.
|
| Everything I try seems to only indent the first item 3 characters.
| Even I try to replace it with ' ' || CHR(10) and it ignores the
| spaces.......
|
| What we want is:
| AA
| BB
| CC
|
| Ideas anyone?

replace(column,'|',chr(10))

Regards
Michel
But what about the leading spaces? Those disappear if I use replace
or translate or even LPAD........

---------------------------------

It is not my experience.
Copy and paste what you did.

Regards
Michel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.