I am trying to insert a query to a partitioned view but the error is :
Server: Msg 4436, Level 16, State 12, Line 1
UNION ALL view 'T' is not updatable because a partitioning column was not found.
Here is all my query statements :
Expand|Select|Wrap|Line Numbers
- create table t1
- (ID int primary key,
- Code int check(code between 1 and 15 ))
- create table t2
- (ID int primary key,
- Code int check(code between 16 and 30 ))
- create view T as
- select * from t1
- union all
- select * from t2
Expand|Select|Wrap|Line Numbers
- insert into T (ID,Code)
- values(1,2)
Would you please help me?