Im using Sybase ASE 15.7 and facing issue while proxy table insert with Default value. We want migrate data from source table to Target table, where target table is in remote server has Additional Columns with Not null and Default values. Please find the below Tables Details.
CREATE TABLE TABLE_SOURCE ( COL1 INT, COL2 INT, COL3 INT )
CREATE TABLE TABLE_TARGET (COL1 INT, COL2 INT, COL3 INT, COL4 INT Default 0 NOT NULL )
Creating Proxy table in Source DB:
CREATE Proxy_Table TAB_TARGET AT 'TGT_SERVER.DB.DBO.TABLE_TARGET'
In Source we have details of three columns and we framed Query with that.
INSERT INTO TAB_TARGET (COL1,COL2,COL3) values (1,2,3)
Error: The column COL4 in table TAB_TARGET does not allow null values., Error 233, Line 1
Though we have declare default costraint for COL4 but it is not accepting that. Is there any way to fix this issue. We have more than 5K Tables where users are migrating data and this issue is there in more than 100 tables.
Is there any way to insert into target table without NOT NULL issue?