Skip site navigation (1) Skip section navigation (2)

Re: update questsion

From: ERIC Lawson - x52010 <eric(at)bioeng(dot)washington(dot)edu>
To: Donald Braman <donald(dot)braman(at)yale(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: update questsion
Date: 2001-02-28 19:22:19
Message-ID: Pine.LNX.4.21.0102281121060.2842-100000@arwen.bioeng.washington.edu (view raw or flat)
Thread:
Lists: pgsql-novice
Seattle just shook hard.  

Anyway, I think you want the text concatenation operator, ||

You might need to cast the data to text also.

On Wed, 28 Feb 2001, Donald Braman wrote:

> I'm trying to update a column to it's orignal contents plus a space plus the
> contents of another column.
> 
> UPDATE cases
> SET citation = citation + ' ' + text(year);
> 
> (citation is text type and year is char type, hence the use of text()
> function)
> I get: Unable to identify an operator '+' for types 'text' and 'unknown'
> I can't find any documentation on how to this sort of thing, so any help is
> appreciated. -Don
> 

-- 

James Eric Lawson
Research Publications Editor III
National Simulation Resource

eric(at)bioeng(dot)washington(dot)edu

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Everyday language is a part of the human organism and is no less 
complicated than it. - Ludwig Wittgenstein (1889-1951) [Tractatus 
Logico-Philosophicus, 1921]



In response to

pgsql-novice by date

Next:From: Peter T. BrownDate: 2001-02-28 22:03:59
Subject: upgrade
Previous:From: Donald BramanDate: 2001-02-28 18:47:25
Subject: update questsion

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group