![]() | |
#21
| |||
| |||
|
|
replace(column,'|',chr(10)) [...] 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. |
#22
| |||
| |||
|
|
On Thu, 11 Sep 2008 12:01:25 -0700 (PDT), e... (AT) chicagorsvp (DOT) com wrote: On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: 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........ I suggest you check (and post the results and your exact code) by prepending the string with an '*' or something like that. You must be doing something wrong: either your code is wrong, or you have a display problem. Also you should also, in *every post* include your complete version number. We can not be bothered to memorize it. -- Sybrand Bakker Senior Oracle DBA- Hide quoted text - - Show quoted text - |
#23
| |||
| |||
|
|
On Thu, 11 Sep 2008 12:01:25 -0700 (PDT), e... (AT) chicagorsvp (DOT) com wrote: On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: 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........ I suggest you check (and post the results and your exact code) by prepending the string with an '*' or something like that. You must be doing something wrong: either your code is wrong, or you have a display problem. Also you should also, in *every post* include your complete version number. We can not be bothered to memorize it. -- Sybrand Bakker Senior Oracle DBA- Hide quoted text - - Show quoted text - |
#24
| |||
| |||
|
|
On Thu, 11 Sep 2008 12:01:25 -0700 (PDT), e... (AT) chicagorsvp (DOT) com wrote: On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: 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........ I suggest you check (and post the results and your exact code) by prepending the string with an '*' or something like that. You must be doing something wrong: either your code is wrong, or you have a display problem. Also you should also, in *every post* include your complete version number. We can not be bothered to memorize it. -- Sybrand Bakker Senior Oracle DBA- Hide quoted text - - Show quoted text - |
#25
| |||
| |||
|
|
On Thu, 11 Sep 2008 12:01:25 -0700 (PDT), e... (AT) chicagorsvp (DOT) com wrote: On Sep 11, 1:41*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: 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........ I suggest you check (and post the results and your exact code) by prepending the string with an '*' or something like that. You must be doing something wrong: either your code is wrong, or you have a display problem. Also you should also, in *every post* include your complete version number. We can not be bothered to memorize it. -- Sybrand Bakker Senior Oracle DBA- Hide quoted text - - Show quoted text - |
#26
| |||
| |||
|
|
Sorry Sybrand. I wound up writing some loop to parse on the delimiter......only 5 lines, but I could not find a way to take a string like this: |
#27
| |||
| |||
|
|
Sorry Sybrand. I wound up writing some loop to parse on the delimiter......only 5 lines, but I could not find a way to take a string like this: |
#28
| |||
| |||
|
|
Sorry Sybrand. I wound up writing some loop to parse on the delimiter......only 5 lines, but I could not find a way to take a string like this: |
#29
| |||
| |||
|
|
Sorry Sybrand. I wound up writing some loop to parse on the delimiter......only 5 lines, but I could not find a way to take a string like this: |
![]() |
| Thread Tools | |
| Display Modes | |
| |