Re: concatenate question - Mailing list pgsql-sql

From Peter Steinheuser
Subject Re: concatenate question
Date
Msg-id AANLkTi=cdwqU0DtFf68BuD=wb3tWfCToe4hn_AUWJFpQ@mail.gmail.com
Whole thread
In response to concatenate question  (Tony Capobianco <tcapobianco@prospectiv.com>)
List pgsql-sql
I think the HINT is what you need to look at.

Cast both columns to text.

On Tue, Dec 7, 2010 at 4:37 PM, Tony Capobianco <tcapobianco@prospectiv.com> wrote:
Here's my table:

       plsql_dw=# \d tmpsv_parent_master
                  Table "staging.tmpsv_parent_master"
            Column     |            Type             | Modifiers
       ----------------+-----------------------------+-----------
        memberid       | numeric                     |
        addeddate      | timestamp without time zone |
        sourceid       | numeric                     |
        regcomplete    | numeric(1,0)                |
        optoutdate     | date                        |
        bouncedate     | date                        |
        websiteid      | numeric                     |
        emailbounced   | numeric(2,0)                |
        emailok        | numeric(2,0)                |
        emailaddress   | character varying(50)       |
        srcwebsiteid   | numeric                     |
        srcmemberid    | numeric                     |
        sitetype       | character varying           |
        commissionpct  | numeric                     |
        pricepermember | numeric                     |
        acceptrate     | numeric(3,2)                |
        mktgcenterid   | numeric                     |
        label          | character varying(32)       |


       Why won't this work?
       plsql_dw=# select memberid || addeddate from tmpsv_parent_master
limit
       10;
       ERROR:  operator does not exist: numeric || timestamp without
time zone
       LINE 1: select memberid || addeddate from tmpsv_parent_master
limit ...
                               ^
       HINT:  No operator matches the given name and argument type(s).
You
       might need to add explicit type casts.

       Thanks.


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



--
Peter Steinheuser
psteinheuser@myyearbook.com

pgsql-sql by date:

Previous
From: Tony Capobianco
Date:
Subject: Re: concatenate question
Next
From: Dmitriy Igrishin
Date:
Subject: Re: concatenate question