<?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 INSERT fails with a subset of columns when columns are NULL in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/INSERT-fails-with-a-subset-of-columns-when-columns-are-NULL/m-p/3294990#M22</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is a bug when I try to insert data with INSERT statement in a table in Synapse data warehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;insert titles (title_id, title, type, pub_id, notes) values('PC9999', 'Net Etiquette',&lt;BR /&gt;'popular_comp', '1389', 'A must-read for computer conferencing.')&lt;BR /&gt;GO&lt;/P&gt;&lt;P&gt;This will give an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Msg 15806, Level 0, State 1&lt;BR /&gt;Cannot insert the value NULL into column 'ytd_sales', table 'titles'; column does not allow nulls. INSERT fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DROP TABLE IF EXISTS titles;&lt;/P&gt;&lt;P&gt;CREATE TABLE titles&lt;BR /&gt;(&lt;BR /&gt;title_id varchar(80),&lt;BR /&gt;title varchar(80) NOT NULL,&lt;BR /&gt;type char(12) NOT NULL,&lt;BR /&gt;pub_id char(4) NULL,&lt;BR /&gt;price DECIMAL(7,2) NULL,&lt;BR /&gt;advance DECIMAL(7,2) NULL,&lt;BR /&gt;royalty int NULL,&lt;BR /&gt;ytd_sales int NULL,&lt;BR /&gt;notes varchar(200) NULL,&lt;BR /&gt;pubdate datetime2(0) NOT NULL&lt;BR /&gt;);&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2023 08:37:00 GMT</pubDate>
    <dc:creator>Hennie1234</dc:creator>
    <dc:date>2023-06-21T08:37:00Z</dc:date>
    <item>
      <title>INSERT fails with a subset of columns when columns are NULL</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/INSERT-fails-with-a-subset-of-columns-when-columns-are-NULL/m-p/3294990#M22</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is a bug when I try to insert data with INSERT statement in a table in Synapse data warehouse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;insert titles (title_id, title, type, pub_id, notes) values('PC9999', 'Net Etiquette',&lt;BR /&gt;'popular_comp', '1389', 'A must-read for computer conferencing.')&lt;BR /&gt;GO&lt;/P&gt;&lt;P&gt;This will give an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Msg 15806, Level 0, State 1&lt;BR /&gt;Cannot insert the value NULL into column 'ytd_sales', table 'titles'; column does not allow nulls. INSERT fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DROP TABLE IF EXISTS titles;&lt;/P&gt;&lt;P&gt;CREATE TABLE titles&lt;BR /&gt;(&lt;BR /&gt;title_id varchar(80),&lt;BR /&gt;title varchar(80) NOT NULL,&lt;BR /&gt;type char(12) NOT NULL,&lt;BR /&gt;pub_id char(4) NULL,&lt;BR /&gt;price DECIMAL(7,2) NULL,&lt;BR /&gt;advance DECIMAL(7,2) NULL,&lt;BR /&gt;royalty int NULL,&lt;BR /&gt;ytd_sales int NULL,&lt;BR /&gt;notes varchar(200) NULL,&lt;BR /&gt;pubdate datetime2(0) NOT NULL&lt;BR /&gt;);&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 08:37:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/INSERT-fails-with-a-subset-of-columns-when-columns-are-NULL/m-p/3294990#M22</guid>
      <dc:creator>Hennie1234</dc:creator>
      <dc:date>2023-06-21T08:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT fails with a subset of columns when columns are NULL</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/INSERT-fails-with-a-subset-of-columns-when-columns-are-NULL/m-p/3296577#M23</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="567080" data-lia-user-login="Hennie1234" class="lia-mention lia-mention-user"&gt;Hennie1234&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for using the Fabric community .&lt;/P&gt;
&lt;P&gt;I think I have a repro and I think the error message with to be corrected .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The correct message should be&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;Error message : Cannot insert the value NULL into column '&lt;STRONG&gt;pubdate &lt;/STRONG&gt;', table 'titles'; column does not allow nulls. INSERT fails.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;I am woerking with the internal team to get this fixed .&lt;BR /&gt;&lt;BR /&gt;As I workaround in your case either update the below&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;pubdate datetime2(0) NULL&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;OR &lt;BR /&gt;pass the&amp;nbsp;&lt;SPAN&gt;pubdate&amp;nbsp; in the INSERT statement .&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;HImanshu &lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 00:01:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/INSERT-fails-with-a-subset-of-columns-when-columns-are-NULL/m-p/3296577#M23</guid>
      <dc:creator>HimanshuS-msft</dc:creator>
      <dc:date>2023-06-22T00:01:03Z</dc:date>
    </item>
  </channel>
</rss>

