Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi!
I'm currently working in a Data Warehouse.
Error:
ERROR: Cannot insert the value NULL into column ''OnskarAttDeltaIAntalSammankomster'', table ''Lagengagemang_VIEW''; column does not allow nulls. INSERT fails.
Table column:
The code I'm running looks something like this:
INSERT [',@TargetSchema,'].[',@TableName,'] (',@Columns,')
SELECT ',@Columns,'
FROM [',@SourceSchema,'].[v',@TableName,']');
basically inserting data from a view into a table.
As you can see from my screen-shot the column that is giving the error allows NULLs.
I've tried to re-create the table multiple times and re-run the insert with no success.
I recently added 4 new column to the table and the view by deleting it and creating it again. Not sure if that has anything to do with anything...
Any ideas what is going on and how to fix it?
Feels like a problem that might go away by just waiting a few days...
br
Solved! Go to Solution.
I had created my view or table wrongly, not it works 🙂
I had created my view or table wrongly, not it works 🙂
Hi @JE_test
Glad that you query got resolved.
Please continue using Fabric Community for further queries.
Thanks.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
12 | |
8 | |
4 | |
3 | |
2 |