From: | Adrian Klaver <aklaver(at)comcast(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | mariolos <mariolos(at)gmail(dot)com> |
Subject: | Re: Sql Update Sentence |
Date: | 2009-05-23 19:47:53 |
Message-ID: | 200905231247.53572.aklaver@comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday 23 May 2009 12:13:58 pm mariolos wrote:
> hello to all!!! i have a quiestion and problem, i need replace a value from
> a field with other value, i try using this sql sentence:
Is this the entire actual SQL statement? If so see below.
>
> update packing_acum set corr=corr + 200) BETWEEN 26821 AND 27340 and
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
First no left parentheses. Second the BETWEEN clause is operating on corr + 200
and resolving to true or false which is the being used to update corr. Since
corr is numeric the update fails.
> extract(year from fec_prod) = 2009 AND cod_packing between 2321 and 2327
>
> but this error appear..
>
> ERROR: column "corr" is of type numeric but expression is of type boolean
> HINT: You will need to rewrite or cast the expression.
> ********** Error **********
>
> ERROR: column "corr" is of type numeric but expression is of type boolean
> Estado SQL:42804
> Sugerencias:You will need to rewrite or cast the expression.
>
>
> where is the problem??
>
> thx in adv.
--
Adrian Klaver
aklaver(at)comcast(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2009-05-23 20:23:35 | Re: Sql Update Sentence |
Previous Message | Lew | 2009-05-23 19:18:21 | Re: Daylight saving time question |