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.
Author |
Topic |
bvanyangu
Starting Member
20 Posts |
Posted - 2014-06-10 : 02:42:29
|
I created a Fact Table with 3 Keys from dimension tables, like Customer Key, property key and territory key. Since I can ONLY have one Identity key on a table, what do I need to do to avoid populating NULLs on these columns..Thanks |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-06-10 : 03:12:24
|
If iam getting it right,you dont want to allow Null values in those columns?If that is the case then add a NOTNULL constraint on those columns.Javeed Ahmed |
|
|
bvanyangu
Starting Member
20 Posts |
Posted - 2014-06-10 : 09:05:48
|
That's right,however I still get the error below if I change to Not to Allow Nulls.Is there something I am missing.[OLE DB Destination [163]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Errorcode: 0x80004005.An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "The statement has been terminated.".An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'Borrower_Key', table 'OLAP.dbo.Fact_Financials'; column does not allow nulls. INSERT fails.". |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2014-06-10 : 10:27:15
|
Yes. Your insert statement is trying to insert a NULL value, and SQL SERVER told you that is not allowed. Your front end (or middle tier) needs to screen the data before you try to ram it into the database.How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
|
|
|
|
|