Firstly, I have read through other posts on this page regarding similar issues but I cannot figure out where I am going wrong. I want to populate a column of [table1] with values from another column in [table2].
When I run,
insert into Staged.dbo.factSales(Date)
select SaleDate
from Staged.dbo.SaleDates
I get the following error
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'SaleValue', table 'Staged.dbo.factSales'; column does not allow nulls. INSERT fails.
SaleValue is the column in Staged.dbo.factSales and design-wise, comes after 'Date' - SaleID, OrderID, ProductID, BranchID, EmployeeID, Date, SaleValue.
Does anyone have any idea where I am going wrong? Thanks in advance!
Marcin