Re: Merging two columns into one - Mailing list pgsql-sql

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: Merging two columns into one
Date
Msg-id m135Rov-000AY5C@druid.net
Whole thread Raw
In response to Re: Merging two columns into one  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-sql
Thus spake Oliver Elphick
>   SELECT col1, col2,..., areacode || phone as phone, colx, coly,...

Although you may want this for easier reading.

SELECT col1, col2,..., (areacode || ' ') || phone as phone, colx, coly,...

Also, I would do "as fullphone" instead so that I don't get confused
between the field name and my generated string but that's mainly a
style issue.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-sql by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: Merging two columns into one
Next
From: "Mitch Vincent"
Date:
Subject: Orderby two different columns