Skip site navigation (1) Skip section navigation (2)

Re: Insert a space between each character

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Insert a space between each character
Date: 2008-09-17 06:39:48
Message-ID: 20080917063947.GA22919@a-kretschmer.de (view raw or flat)
Thread:
Lists: pgsql-sql
am  Wed, dem 17.09.2008, um 11:49:27 +0530 mailte Nicholas I folgendes:
> Hi,
> 
>  can anybody help me, to insert a space between each character in postgresql.
> 
>  for example,
> 
>   ABC
> 
>  output
>   A B C

write a function in plpgsql, you can use string-function like substr to
split the string. Write a loop over the string, pick up every char, and
concatenate a space. Return the new string.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

In response to

pgsql-sql by date

Next:From: Michael ToewsDate: 2008-09-17 06:50:21
Subject: Re: Insert a space between each character
Previous:From: Nicholas IDate: 2008-09-17 06:19:27
Subject: Insert a space between each character

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group