Check this link.
It's useful to resolve the issue.
http://blog.ropardo.ro/2010/05/04/extending-postgresql-a-better-concat-operator/
- Vipul
On Thu, Aug 25, 2011 at 12:54 PM, Scott Marlowe wrote:
> On Thu, Aug 25, 2011 at 8:52 AM, Oliveiros d'Azevedo Cristina
> wrote:
> > Something like this.
On Thu, Aug 25, 2011 at 8:52 AM, Oliveiros d'Azevedo Cristina
wrote:
> Something like this...?
>
> SELECT first_name,surname, email1 || ';' || email2
> FROM t_your_table;
If there's any nulls in email1 or email2 they'll need special handling
with coalesce.
--
Sent via pgsql-sql mailing list (pg
(anonymous) wrote:
> I have to deal with a table which contains:
> first_name
> surname
> email1
> email2
> ... and I would like to create a view which combines both email columns thus:
> first_name
> surname
> email
> It looks simple but I can't think of an obvious query.
Try:
| SELECT firs
I have to deal with a table which contains:
first_name
surname
email1
email2
... and I would like to create a view which combines both email columns
thus:
first_name
surname
email
It looks simple but I can't think of an obvious query.
---
Something like this...?
SELECT first_name,surname, email1 || ';' || email2
FROM t_your_table;
Best,
Oliver
- Original Message -
From: "gvim"
To: "pgsql sql"
Sent: Thursday, August 25, 2011 3:21 PM
Subject: [SQL] Add one column to another
I have to deal with a table which contain
Use the concat || operator.
On Thu, 2011-08-25 at 15:21 +0100, gvim wrote:
> I have to deal with a table which contains:
>
> first_name
> surname
> email1
> email2
>
> ... and I would like to create a view which combines both email columns thus:
>
> first_name
> surname
> email
>
> It looks s