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 Raw
In response to concatenate question  (Tony Capobianco <tcapobianco@prospectiv.com>)
List pgsql-sql
I think the HINT is what you need to look at.<br /><br />Cast both columns to text.<br /><br /><div
class="gmail_quote">OnTue, Dec 7, 2010 at 4:37 PM, Tony Capobianco <span dir="ltr"><<a
href="mailto:tcapobianco@prospectiv.com">tcapobianco@prospectiv.com</a>></span>wrote:<br /><blockquote
class="gmail_quote"style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left:
1ex;">Here'smy table:<br /><br />        plsql_dw=# \d tmpsv_parent_master<br />                   Table
"staging.tmpsv_parent_master"<br/>             Column     |            Type             | Modifiers<br />      
 ----------------+-----------------------------+-----------<br/>         memberid       | numeric                    
|<br/>         addeddate      | timestamp without time zone |<br />         sourceid       | numeric                  
 |<br />         regcomplete    | numeric(1,0)                |<br />         optoutdate     | date                    
  |<br />         bouncedate     | date                        |<br />         websiteid      | numeric                
   |<br />         emailbounced   | numeric(2,0)                |<br />         emailok        | numeric(2,0)          
    |<br />         emailaddress   | character varying(50)       |<br />         srcwebsiteid   | numeric              
     |<br />         srcmemberid    | numeric                     |<br />         sitetype       | character varying  
       |<br />         commissionpct  | numeric                     |<br />         pricepermember | numeric          
         |<br />         acceptrate     | numeric(3,2)                |<br />         mktgcenterid   | numeric        
           |<br />         label          | character varying(32)       |<br /><br /><br />        Why won't this
work?<br/>        plsql_dw=# select memberid || addeddate from tmpsv_parent_master<br /> limit<br />        10;<br />  
    ERROR:  operator does not exist: numeric || timestamp without<br /> time zone<br />        LINE 1: select memberid
||addeddate from tmpsv_parent_master<br /> limit ...<br />                                ^<br />        HINT:  No
operatormatches the given name and argument type(s).<br /> You<br />        might need to add explicit type casts.<br
/><br/>        Thanks.<br /><font color="#888888"><br /><br /> --<br /> Sent via pgsql-sql mailing list (<a
href="mailto:pgsql-sql@postgresql.org">pgsql-sql@postgresql.org</a>)<br/> To make changes to your subscription:<br /><a
href="http://www.postgresql.org/mailpref/pgsql-sql"target="_blank">http://www.postgresql.org/mailpref/pgsql-sql</a><br
/></font></blockquote></div><br/><br clear="all" /><br />-- <br />Peter Steinheuser<br /><a
href="mailto:psteinheuser@myyearbook.com">psteinheuser@myyearbook.com</a><br/> 

pgsql-sql by date:

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