Re: Add columns to table; insert values based on row
От
Adrian Klaver
Тема
Re: Add columns to table; insert values based on row
Дата
Msg-id
9acea769-2a99-69a2-beaf-d84834a242b0@aklaver.com
Ответ на
Re: Add columns to table; insert values based on row (Rich Shepard)
Список
Дерево обсуждения
Re: Add columns to table; insert values based on row Rich Shepard <rshepard@appl-ecosys.com>
Re: Add columns to table; insert values based on row Rich Shepard <rshepard@appl-ecosys.com>
Re: Add columns to table; insert values based on row Ken Tanzer <ken.tanzer@gmail.com>
Re: Add columns to table; insert values based on row Rich Shepard <rshepard@appl-ecosys.com>
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 exists with four attribute columns and their data. I'm > adding four new columns and their data base on the existing row's value in > column site_nbr. > > Based on your and Adrian's responses I'll go ahead and enter the values > filled intert statements for each row. 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. > > Thanks, > > Rich > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления