On Tue, 29 Mar 2011, Roderick A. Anderson wrote:
> A CAST should handle getting the data from the tmp_col back into record.
> The serial was a simple way to get the column incrementally filled.
I need to read more about CAST. My understanding is it is used to change a
data type (e.g., casting a FLOAT to NUMERIC when selecting a decimal value
that cannot be exactly matched otherwise). I did not realize it could be
used to move values among columns.
> And it appears I got caught up in the solution and forgot the record
> column was (going to be?) coming with the data from this point on. No
> need to create the SEQUENCE. Just a UNIQUE INDEX will keep it all
Almost 1/3 of the rows already have values in the record column. I want to
replace the NULLs with values in the other two thirds so the column can be
used as a PK. Since the non-NULL rows are data from 2008-2009 it's a valid
assumption that data from 2010 and beyond will also have a value for this
In response to
pdxpug by date
|Next:||From: Rich Shepard||Date: 2011-04-01 15:31:19|
|Subject: Re: Adding Missing Data to a Table [SOLVED]|
|Previous:||From: Roderick A. Anderson||Date: 2011-03-30 04:43:45|
|Subject: Re: Adding Missing Data to a Table|