<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic &amp;quot;column does not allow nulls. INSERT fails, but column allows NULL&amp;quot;. But column allows nulls... in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3853636#M693</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm currently working in a Data Warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR: Cannot insert the value NULL into column ''OnskarAttDeltaIAntalSammankomster'', table ''Lagengagemang_VIEW''; column does not allow nulls. INSERT fails.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table column:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I'm running looks something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;INSERT [',@TargetSchema,'].[',@TableName,'] (',@Columns,')&lt;BR /&gt;SELECT ',@Columns,'&lt;BR /&gt;FROM [',@SourceSchema,'].[v',@TableName,']');&lt;/P&gt;&lt;P&gt;basically inserting data from a view into a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see from my screen-shot the column that is giving the error allows NULLs.&lt;/P&gt;&lt;P&gt;I've tried to re-create the table multiple times and re-run the insert with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what is going on and how to fix it?&lt;/P&gt;&lt;P&gt;Feels like a problem that might go away by just waiting a few days...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 12:12:25 GMT</pubDate>
    <dc:creator>JE_test</dc:creator>
    <dc:date>2024-04-19T12:12:25Z</dc:date>
    <item>
      <title>"column does not allow nulls. INSERT fails, but column allows NULL". But column allows nulls...</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3853636#M693</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm currently working in a Data Warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR: Cannot insert the value NULL into column ''OnskarAttDeltaIAntalSammankomster'', table ''Lagengagemang_VIEW''; column does not allow nulls. INSERT fails.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table column:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I'm running looks something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;INSERT [',@TargetSchema,'].[',@TableName,'] (',@Columns,')&lt;BR /&gt;SELECT ',@Columns,'&lt;BR /&gt;FROM [',@SourceSchema,'].[v',@TableName,']');&lt;/P&gt;&lt;P&gt;basically inserting data from a view into a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see from my screen-shot the column that is giving the error allows NULLs.&lt;/P&gt;&lt;P&gt;I've tried to re-create the table multiple times and re-run the insert with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what is going on and how to fix it?&lt;/P&gt;&lt;P&gt;Feels like a problem that might go away by just waiting a few days...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 12:12:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3853636#M693</guid>
      <dc:creator>JE_test</dc:creator>
      <dc:date>2024-04-19T12:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: "column does not allow nulls. INSERT fails, but column allows NULL". But column allows nulls...</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3854070#M694</link>
      <description>&lt;P&gt;I had created my view or table wrongly, not it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 14:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3854070#M694</guid>
      <dc:creator>JE_test</dc:creator>
      <dc:date>2024-04-19T14:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: "column does not allow nulls. INSERT fails, but column allows NULL". But column allows nulls...</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3858075#M695</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="645442" data-lia-user-login="JE_test" class="lia-mention lia-mention-user"&gt;JE_test&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad that you query got resolved. &lt;BR /&gt;Please continue using Fabric Community for further queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 06:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/quot-column-does-not-allow-nulls-INSERT-fails-but-column-allows/m-p/3858075#M695</guid>
      <dc:creator>v-cboorla-msft</dc:creator>
      <dc:date>2024-04-22T06:50:50Z</dc:date>
    </item>
  </channel>
</rss>

