On Fri, February 4, 2011 12:51, Rich Shepard wrote:
> I _think_ today's the worst cold day and my head will clear from now
> In the meantime, I'm not seeing why an UPDATE statement does not return
> number of updated rows.
> The idea is to replace NULL values in the units column with 'mg/L':
> jerrittwq=# update monitor set units = 'mg/L' where units = NULL;
> UPDATE 0
> and there should be several thousands of updated rows. I've also tried
> specifying the units attribute as '' and ' ' with no better results.
> be a simple statement and I'm not seeing why it fails.
> FWIW, I tried specifying an alias for the table, but that barfed for a
> different reason:
> jerrittwq=# update monitor as m set m.units = 'mg/L' where m.units = NULL;
> ERROR: column "m" of relation "monitor" does not exist
> LINE 1: update monitor as m set m.units = 'mg/L' where m.units = NUL...
> Clue stick, please,
> Sent via pdxpug mailing list (pdxpug(at)postgresql(dot)org)
> To make changes to your subscription:
I believe you want to use units IS NULL; instead of units = NULL; in your
Timothy J. Bruce
visit my Website at: http://www.tbruce.com
Registered Linux User #325725
In response to
pdxpug by date
|Next:||From: Darrell Fuhriman||Date: 2011-02-04 20:58:14|
|Subject: Re: UPDATE Syntax Error|
|Previous:||From: Rich Shepard||Date: 2011-02-04 20:51:23|
|Subject: UPDATE Syntax Error|