INSERT INTO DATA_QUALITY.DQ_control
WHERE MigrationInd = 'Y'
) as stg
The above is giving the follow error :
The positional assignment list has too few values. What positional list? I am inserting one column and retrieving one column. The target row column specs are to allow nulls in all columns.
The problem is that the target table has more colums - so how should the DB system know which is the right one.
just add the target columnname after the tablename like below and it should work.
CREATE TABLE test_a_d
(pk_id integer not null, val VARCHAR(50))
unique PRIMARY INDEX (pk_id)
insert into test_a_d (pk_id) select current_date - calendar_date from sys_calendar.calendar