All,
Many thanks for your thoughts on the merging of columns. The tr method would have
killed all the delimiters as a few people noted. The || method in SQL was the winner,
although the final table this has to be done to (4 million records) should kill the
system for a while! Must make sur
"D'Arcy J.M. Cain" wrote:
>
> PostgreSQL could use a
> phone number type. I have been meaning to write a user defined type
> for some time but never seem to get around to it. Maybe you could
> give this a shot. The examples in contrib should get you started.
> Once finished you can make the ph
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
Thus spake Gary MacMinn
> I have two columns in a table (areacode and phone number) that I'd like to merge
>into one (phone number) containing both sets of info. Could anyone suggest a simple
>way of achieving this?
Oliver showed you how to merge these together with the SQL concatenate
operator
Christopher Sawtell wrote:
>On Fri, 23 Jun 2000, Gary MacMinn wrote:
>> Hi All,
>>
>> I have two columns in a table (areacode and phone number) that I'd like to
> merge
>into one (phone number) containing both sets of info. Could anyone suggest a
>simple way of achieving this?
On Fri, 23 Jun 2000, Gary MacMinn wrote:
> Hi All,
>
> I have two columns in a table (areacode and phone number) that I'd like to merge
into one (phone number) containing both sets of info. Could anyone suggest a
simple way of achieving this?
export the data to a file using the copy command,
rem
Hi All,
I have two columns in a table (areacode and phone number) that I'd like to merge into
one (phone number) containing both sets of info. Could anyone suggest a simple way of
achieving this?
Thanks,
Gary MacMinn