Reputation: 3
Hi I'm trying to insert values in the last column for my table from another table but am getting error ERROR:
null value in column "name" violates not-null constraint DETAIL: Failing row contains (ddf1caf0-26c2-49e1-8a73-64227eae1f50, null, null, null, null, null, 2532).
Upvotes: 0
Views: 596
Reputation: 164139
I suspect that you want to update the column subsystem
of the table software_instances
with values of the column sub
of the table temp_subsystem
:
update software_instances si
set subsystem = ts.sub
from temp_subsystem ts
where ts.module = si.module
Upvotes: 0
Reputation: 5531
there are two solutions to this issue
name
value populated.
Add where name!=null
in the select queryor
alter the software_instance
table , to accept null values for name
column.
ALTER TABLE SOFTWARE_INSTANCES ALTER COLUMN NAME DROP NOT NULL
Upvotes: 0