[EMAIL PROTECTED] (Laurent Patureau) schreef:
>UPDATE table SET col .= '$val'
Try:
UPDATE table set col = col || '$val'
http://www.postgresql.org/idocs/index.php?functions-string.html
--
Vriendelijke groet,
René Pijlman <[EMAIL PROTECTED]>
Wat wil jij leren?
http://www.leren.nl/
-
That doesn't tend to work in any SQL database I've ever used, though I'm
told Informix can do something similiar.
You need to insert the data into a temp table then delete the rows in the
base table, then insert back from the temp table. Yeah it is a pain.
John
"ivan" <[EMAIL PROTECTED]> wrot
Tom Lane wrote:
> Kyle <[EMAIL PROTECTED]> writes:
> > It appears that the first function would get evaluated first under 7.0.3
> > but the last function gets evaluated first under 7.1. Is that accurate?
>
> Actually, I was under the impression that (all else being equal) WHERE
> clauses would g
Kyle <[EMAIL PROTECTED]> writes:
> It appears that the first function would get evaluated first under 7.0.3
> but the last function gets evaluated first under 7.1. Is that accurate?
Actually, I was under the impression that (all else being equal) WHERE
clauses would get evaluated right-to-left i
Carolyn Lu Wong <[EMAIL PROTECTED]> writes:
> Forgot to mention that I'm using V6.5.
Oh. 6.5's support for sub-selects is pretty limited :-(.
I think the only way to do it in 6.5 is with a temp table,
eg
SELECT id, sum(amount) as sum into temp table tt from t2 group by id;
update t1 set amount
Forgot to mention that I'm using V6.5. It doesn't seem to like
subqueries, got the following error:
ERROR: parser: parse error at or near "select"
What I really want to do is follows
t2: ID Amount
---
1 1 ..
1
This update field with the sum of all amounts in t2. I want to update
sum of each individual IDs.
Tubagus Nizomi wrote:
>
> update t1
> set amount = sum(b.amount)
> from ts b
> where a.id=b.id
>
> On Thursday 18 January 2001 09:54, Carolyn Wong wrote:
> > I'd like to know what's the correct SQ