On Mon, Jun 10, 2024 at 5:16 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Mon, Jun 10, 2024 at 12:43 PM Ron Johnson
>> wrote:
>
>
>> Most useful to you will be some number of "ALTER TABLE DISABLE
>> TRIGGER ALL;" statements near the beginning of the file, and their "ALTER
>> TA
On Mon, 10 Jun 2024, David G. Johnston wrote:
Values introduces literal records/rows. Rows are written within
parentheses. Values (..., ...), (..., ...)
You seem to have the closing parenthesis but not the opening one.
David,
Duh! Of course. For whatever the reason I kept not seeing that.
M
On Mon, Jun 10, 2024 at 2:58 PM Rich Shepard
wrote:
>
> INSERT into companies (company_nbr,company_name,industry,status) VALUES
> nextval('companies_org_nbr_seq'),'Acme','Manufacturing','Opportunity'),
> nextval('companies_org_nbr_seq'),'Baker','Livestock','Opportunity');
>
> Running:
> $ psql -U
On Mon, 10 Jun 2024, Peter J. Holzer wrote:
My question is whether I can create new rows for all three tables in the
same sql source file.
Yes, of course.
Since the location and contact tables require sequence
numbers from the company and location tables is there a way to specify,
e.g., cur
On 2024-06-10 11:50:27 -0700, Rich Shepard wrote:
> My business tracking database has three main tables: company, location,
> contact. The company and contact primary keys are sequences.
>
> I've been adding new rows using INSERT INTO files separately for each table
> after manually finding the la
>
> On Mon, Jun 10, 2024 at 12:43 PM Ron Johnson
> wrote:
> Most useful to you will be some number of "ALTER TABLE DISABLE
> TRIGGER ALL;" statements near the beginning of the file, and their "ALTER
> TABLE ... ENABLE TRIGGER ALL;" counterparts near the end of the file.
>
>
Have you just not he
On Mon, Jun 10, 2024 at 4:06 PM Rich Shepard
wrote:
> On Mon, 10 Jun 2024, Ron Johnson wrote:
>
> > With enough clever scripting you can create a .sql file that does almost
> > anything.
>
> Ron,
>
> My projects don't all use SQL so I'm far from a clever scripter. :-)
>
No one is born a scripter
On Mon, 10 Jun 2024, Torsten Förtsch wrote:
Something along these lines perhaps:
=# create table a( id bigserial primary key, x text );
CREATE TABLE
=# create table b( fk bigint references a(id), y text );
CREATE TABLE
=# with ins_a as (insert into a (x) values ('a row') returning *)
insert i
On Mon, 10 Jun 2024, Ron Johnson wrote:
With enough clever scripting you can create a .sql file that does almost
anything.
Ron,
My projects don't all use SQL so I'm far from a clever scripter. :-)
Most useful to you will be some number of "ALTER TABLE DISABLE
TRIGGER ALL;" statements near
On Mon, Jun 10, 2024 at 8:50 PM Rich Shepard
wrote:
> My question is whether I can create new rows for all three tables in the
> same sql source file. Since the location and contact tables require
> sequence
> numbers from the company and location tables is there a way to specify,
> e.g., current
On Mon, Jun 10, 2024 at 2:50 PM Rich Shepard
wrote:
> My business tracking database has three main tables: company, location,
> contact. The company and contact primary keys are sequences.
>
> I've been adding new rows using INSERT INTO files separately for each table
> after manually finding the
My business tracking database has three main tables: company, location,
contact. The company and contact primary keys are sequences.
I've been adding new rows using INSERT INTO files separately for each table
after manually finding the last PK for the company and contact tables. The
location tabl
12 matches
Mail list logo