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 rshepard -d bustrac -f test-script.sql psql:test-script.sql:3: ERROR: syntax error at or near "nextval" LINE 2: nextval('companies_org_nbr_seq'),'Acme','Manufacturing','Opp... ^ What have I missed?
Values introduces literal records/rows. Rows are written within parentheses.
Values (..., ...), (..., ...)
You seem to have the closing parenthesis but not the opening one.