title: T-SQL : UNION ALL view not updatable because a partitioning column was not found
body: <p>How can I insert in a view with date constraints?</p>
  
  <p>Here are my tables resulted after clicking on script as create table :</p>
  
  <p><code>Table 1</code>:</p>
  
  <pre><code>CREATE TABLE [dbo].[tbl_zaua_1_17](
      [id] [int] NOT NULL,
      [date] [datetime] NULL,
  
       CONSTRAINT [PK_tbl_zaua_1_17] PRIMARY KEY CLUSTERED 
  (
      [id] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  ) ON [PRIMARY]
  GO
  
  SET ANSI_PADDING OFF
  GO
  
  ALTER TABLE [dbo].[tbl_zaua_1_17]  
  WITH CHECK ADD  CONSTRAINT [CK_tbl_zaua_1_17] 
  
  CHECK  (([date]&lt;'2014-01-18 00:00:00.000' AND [date]&gt;'2014-01-16 00:00:00.000'))
  GO
  
  ALTER TABLE [dbo].[tbl_zaua_1_17] CHECK CONSTRAINT [CK_tbl_zaua_1_17]
  GO`
  </code></pre>
  
  <p><code>Table 2</code>:</p>
  
  <pre><code>CREATE TABLE [dbo].[tbl_zaua_1_11](
      [id] [int] NOT NULL,
      [date] [datetime] NULL,
   CONSTRAINT [PK_tbl_zaua_1_11] PRIMARY KEY CLUSTERED 
  (
      [id] ASC
  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  ) ON [PRIMARY]
  
  GO
  
  ALTER TABLE [dbo].[tbl_zaua_1_11]  WITH CHECK ADD  CONSTRAINT [CK_tbl_zaua_1_11] CHECK  (([date]&lt;'2014-01-12 00:00:00.000' AND [date]&gt;'2014-01-10 00:00:00.000'))
  GO
  
  ALTER TABLE [dbo].[tbl_zaua_1_11] CHECK CONSTRAINT [CK_tbl_zaua_1_11]
  GO`
  </code></pre>
  
  <p>View creation:</p>
  
  <pre><code>create view zaua1
  as
     select * from [dbo].[tbl_zaua_1_11]
     union all
     select * from [dbo].[tbl_zaua_1_17]`
  </code></pre>
  
  <p>Insert gives error:</p>
  
  <blockquote>
    <p>UNION ALL view is not updatable because a partitioning column was not found.</p>
  </blockquote>
  
  <pre><code>insert into [dbo].[zaua1]
  values (3,'2014-01-11')
  </code></pre>