Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Insert/update/delete with partitioned view problem

Author  Topic 

zapouk
Starting Member

2 Posts

Posted - 2011-07-14 : 14:38:34
I'm stuck with 2008 R2 standard edition and so I can't do true partitioning and have to use a partitioned view.
This is fine, but BOL states:

"INSERT, UPDATE, and DELETE actions against a partitioned view are not allowed if there is a self-join with the same view or with any of the member tables in the statement."

So how do you insert rows into a partitioned view from another table when you have to reference the view to find the rows that don't exist??

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2011-07-14 : 16:08:12
For that case I think you'll need to insert directly to all member tables using the same logic in the WHERE clauses as you have in your CHECK constraints that define the partitions.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -