Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Execution error: Null

Author  Topic 

Royal
Starting Member

32 Posts

Posted - 2007-01-18 : 15:05:29
I thing I need your help..I have a data task flow w Derived Column Transformation to concatenate name +familyname. It seems like Nulls are not accepeted but where do I correct it?
How do I
[OLE DB Destination [658]] Error: An OLE DB error has occurred. Error code: 0x80040E2F. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "Cannot insert the value NULL into column 'namn', table 'ElektronicsDW.dbo.Dim_Salesperson'; column does not allow nulls. INSERT fails.".

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-18 : 19:38:16
You have to change the table to allow nulls or make sure the insert does not try to put null into that column.

in your derived column just test for null - see isnull

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Royal
Starting Member

32 Posts

Posted - 2007-01-20 : 13:06:34
thnak you!
Added following expression in the derived Column;
(ISNULL([firstname]) ? "" : [firstname] + " ") + (ISNULL(familyname) ? "" : (familyname) + " ")
Get error: [OLE DB Destination [1123]] Error: An OLE DB error has occurred. Error code: 0x80040E2F. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "Cannot insert the value NULL into column 'name', table 'ElektronicDW.dbo.Dim_Salesperson'; column does not allow nulls. INSERT fails.".

Moreover Mapping Input column is ignore, Destination column name.Ok?
Go to Top of Page

Royal
Starting Member

32 Posts

Posted - 2007-01-21 : 11:03:24
ok ok solved !:-) thanks!

Moreover I have a Fact table Purchase containing Purchase ID's.
In the OLE DB destination column I have a Demo_id which should refer to Dim_Demography_ ID which should return the characteristics as occupation, sex and salary from Dim-demography. How would I do that?

The OLE DB source sql command (with occupation, sex and salary but not mapped ):
SELECT Sum, k.sum-p.price AS profit, convert (char(8),date,112) as date_id, sex, salary, occupation, k.shop_id, k.customer_nr, salesperson_id, p.product_nr, campaign_id
FROM Purchase k join product p on k.product_nr=p.product_nr join customer ku on k.customernr=ku.customernr
Go to Top of Page
   

- Advertisement -