Re: SSIS and 'Cannot insert the value NULL into column 'myField''

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello Larry,

Have a look at the derived column transform. You can do what you want in there.

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

*simple problem and newbie has no clue..* ;-)

I have to copy data from one sql server table into another sql server
table. I'm using SSIS for the first time...

I'm using a simple data type conversion to move the data from one
table into another and this works fine for some tables. In another
table, I get the error:

"Cannot insert the value NULL into column 'myField', table
'ISCTest.dbo.tblmyTableXY'; column does not allow nulls. INSERT
fails."

This sounds really reasonable to me, because there is a field
'myField' in the destination table which really does not allow NULLs
and there is no such field in the source table. I would just like to
give a static value (='1') into this field, but I really can't figure
out how. I tried to set a variable, but I don't know how to assign the
value of the variable to this field...

Any hints are greatly appreciated!



.



Relevant Pages

  • SSIS and Cannot insert the value NULL into column myField
    ... I have to copy data from one sql server table into another sql server ... I'm using SSIS for the first time... ... column does not allow nulls. ... This sounds really reasonable to me, because there is a field 'myField' ...
    (microsoft.public.sqlserver.dts)
  • Re: Problem altering table and adding a default
    ... SQL Server does not allow that - you can only add nullable ... > After you add a new column in Enterprise Manager, uncheck Allow Nulls, ... the ALTER TABLE statement above will pass to the SQL Server ... > 4) Start Profiler and perform a new trace. ...
    (microsoft.public.sqlserver.server)
  • Re: Storage Impact of nullable varchar column?
    ... SQL Server MVP ... > don't use nulls in your columns, apparently if your column is say 1000 ... > Can the use of NULLS in a database affect performance? ... So if you have a column that is 25 characters wide, ...
    (microsoft.public.sqlserver.programming)
  • Re: Proposal: 6NF
    ... Should I try it on Sybase ASE 12.5? ... SQL SERVER, ORACLE and DB2 have the same heritage then... ... insert table1 ... consequence of allowing NULLS at the first place... ...
    (comp.databases.theory)
  • Re: Unique index not recognizing null
    ... if they're not subject to the constraints of the Index?" ... consistent with other products - including SQL Server, Oracle, and how MS ... value in one or more of the key fields will not be included in the ... Nulls setting made no difference. ...
    (microsoft.public.access.tablesdbdesign)