On Thu, 1 Nov 2018, Ken Tanzer wrote:
I'm not sure what format your text file is in, but you could probably use
\copy to bring it into a (temporary) table in Postgres. As long as it had
your four new columns and the site_nbr, you could then update from that
table in one swoop:
Ken,
Thank yo
On Thu, Nov 1, 2018 at 5:08 PM Rich Shepard
wrote:
> On Thu, 1 Nov 2018, Rich Shepard wrote:
>
> > I'll use gawk to extract the relevant fields from the text file in which
> > they reside (in the correct order), then use emacs keyboard macros to add
> > the appropriate update text to each line. M
On Thu, 1 Nov 2018, Rich Shepard wrote:
I'll use gawk to extract the relevant fields from the text file in which
they reside (in the correct order), then use emacs keyboard macros to add
the appropriate update text to each line. Must more efficient (and less
tedious) than manually writing each l
On Fri, 2 Nov 2018, Tim Cross wrote:
3. Is it really insert or update you need?
Tim,
Update.
It's been a long time since I did any database manipulation (I just use
the existing databases as each project needs its data) so I sometimes make
these types of mistakes.
Your idea of manipul
Rich Shepard writes:
> On Thu, 1 Nov 2018, Adrian Klaver wrote:
>
>>> alter table stations add column start_date date;
>>> alter table stations add column end_date date;
>>> alter table stations add column howmany integer;
>>> alter table stations add column bin_col char(8);
>>>
>>> insert int
On Thu, 1 Nov 2018, Adrian Klaver wrote:
Why? As David said that will get you an additional 82 rows with data that is
dissociated from the existing data. You want to update the existing rows with
the new field data for each station.
D'oh! Of course!
Thanks both,
Rich
On 11/1/18 1:53 PM, Rich Shepard wrote:
On Thu, 1 Nov 2018, David G. Johnston wrote:
That makes no sense to me...you already have 82 rows on the table so
if you
insert 82 more you'll have 164 which doesn't seem like what you would
want...
I would probably do:
David,
The table already ex
On Thu, 1 Nov 2018, David G. Johnston wrote:
That makes no sense to me...you already have 82 rows on the table so if you
insert 82 more you'll have 164 which doesn't seem like what you would
want...
I would probably do:
David,
The table already exists with four attribute columns and their
On Thu, 1 Nov 2018, Adrian Klaver wrote:
alter table stations add column start_date date;
alter table stations add column end_date date;
alter table stations add column howmany integer;
alter table stations add column bin_col char(8);
insert into stations (start_date, end_date, howmany, bin_col
On 11/1/18 1:23 PM, Rich Shepard wrote:
I have the following code in a script:
alter table stations add column start_date date;
alter table stations add column end_date date;
alter table stations add column howmany integer;
alter table stations add column bin_col char(8);
insert into station
On Thu, Nov 1, 2018 at 1:26 PM Rich Shepard
wrote:
>I have the following code in a script:
>
> alter table stations add column start_date date;
> alter table stations add column end_date date;
> alter table stations add column howmany integer;
> alter table stations add column bin_col char(8)
I have the following code in a script:
alter table stations add column start_date date;
alter table stations add column end_date date;
alter table stations add column howmany integer;
alter table stations add column bin_col char(8);
insert into stations (start_date, end_date, howmany, bin_col)
12 matches
Mail list logo