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 2000 Forums
 SQL Server Administration (2000)
 Union All view that is not updatable - problem with the check constraint

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-27 : 11:24:50
Shirly writes "Hi,

I defined for example 2 base tables with the following check constraints:
CHECK ([TimeMinuteID]<=100000000000)
CHECK ([TimeMinuteID]>100000000000)
when attempting to insert a row to the view, I get the error message: "UNION ALL view 'LICENSE_SNAPSHOT_FACT' is not updatable because a partitioning column was not found." .

But when I define the same base tables with the following check constraints, the error does not occur and the record can be inserted into the view:
CHECK ([TimeMinuteID]<=10000)
CHECK ([TimeMinuteID]>10000)

Is there any limitation on the check constraint definition?
Can you explain this behavior?
Is it a bug?

Using following constraints on the base tables returns the same error message:
CHECK ([TimeMinuteID]/100000000 = 2001)
CHECK ([TimeMinuteID] /1000000 >= 200201 AND [TimeMinuteID] /1000000<=200205)
CHECK ([TimeMinuteID]/1000000 = 200206)
CHECK ([TimeMinuteID]/1000000 = 200207)...

Thanks,
Shirly."
   

- Advertisement -