Friday, February 24, 2012

Cannot insert into partitioned view

I'm attempting to insert data into a partitioned view, the member tables and
view adhere to all the requirements stated in BOL. However on Insert I get
an error stating:
Server: Msg 550, Level 16, State 1, Line 1
The attempted insert or update failed because the target view either
specifies WITH CHECK OPTION or spans a view that specifies WITH CHECK OPTION
and one or more rows resulting from the operation did not qualify under the
CHECK OPTION constraint.
The statement has been terminated.
I have verified that the partitioned view does not have WITH CHECK OPTION
set, why would I receive this error?Possible that you have data that is outside the view's partition
specification? Try insert in batches, smaller and smaller when you hit the
failing batch, to locate the records and check on them.
"mkelly" <mkelly@.discussions.microsoft.com> wrote in message
news:149486BA-772F-425B-9D5B-EEEC59DE95E4@.microsoft.com...
> I'm attempting to insert data into a partitioned view, the member tables
and
> view adhere to all the requirements stated in BOL. However on Insert I
get
> an error stating:
> Server: Msg 550, Level 16, State 1, Line 1
> The attempted insert or update failed because the target view either
> specifies WITH CHECK OPTION or spans a view that specifies WITH CHECK
OPTION
> and one or more rows resulting from the operation did not qualify under
the
> CHECK OPTION constraint.
> The statement has been terminated.
> I have verified that the partitioned view does not have WITH CHECK OPTION
> set, why would I receive this error?
>|||That was it, I was missing an additional piece of date limiting criteria.
Thanks for pointing that out!

No comments:

Post a Comment