I am trying to run an insert statement against a tables which has few NOT Null columns in it.In case the values are not assigned to those columns then a default function defined assigns the values. While i am trying to run the Insert statement from SSIS the package is failing due to NOT Null Constraint. Please suggest.
If i assign values to all the columns it is running successfully but i want the default values to be assigned automatically rather than passing every time.
Below is the tables script: ALTER TABLE [Fee] ADD DEFAULT ([dbo].svf_GetUser) FOR [CreatedBy] GO
[OLE DB Destination [2]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'CreatedBy', table 'SAI.dbo.Fee'; column does not allow nulls. INSERT fails.".
Fast loadoption in the destinationData Access Mode. Also try to uncheck theCheck constraintcheckbox in the destination. - Hadi