Forum Discussion
Cannot insert the value NULL into column - colom is nulllable and i filter out null values
- Anonymous1 year ago
Hi Anonymous ,
Can you try this and let me know the results?
INSERT INTO [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct] (ind, Item, UnitPrice, ValidFrom, validUntil) SELECT 1, Item, UnitPrice, ValidFrom, validUntil from [SilverWH_salesorder].[dbo].[scd2_product_view] where Item is not NULL and UnitPrice is not NULL and ValidFrom is not NULL and validUntil is not NULL;It works fine in my case.
The problem should be with the ind column, which is set to not null but does not have any value when inserted.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Anonymous ,
Can you try this and let me know the results?
INSERT INTO [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct]
(ind, Item, UnitPrice, ValidFrom, validUntil)
SELECT 1, Item, UnitPrice, ValidFrom, validUntil
from [SilverWH_salesorder].[dbo].[scd2_product_view]
where Item is not NULL and UnitPrice is not NULL and ValidFrom is not NULL and validUntil is not NULL;
It works fine in my case.
The problem should be with the ind column, which is set to not null but does not have any value when inserted.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum