|
Posted by Michael Austin on 01/16/07 00:15
markjerz@googlemail.com wrote:
> Hi,
>
> I basically have two tables with the same structure. One is an archive
> of the other (backup). I want to essentially insert the data in to the
> other.
>
> I use:
>
> INSERT INTO table ( column, column .... )
> SELECT * FROM table2
>
> Now, table2 has a rule on various columns:
>
> @CHARACTER IN ('Y','N')
>
> but the column allows nulls, in the design view is says so anyway.
>
> When I run this query I get:
>
> A column insert or update conflicts with a rule imposed by a previous
> CREATE RULE statement. The statement was terminated. The conflict
> occurred in database 'database', table 'table', column 'column'.
> The statement has been terminated.
>
> Obviously, I've changed the names of everything.
>
> The only data in those columns which could possibly conflict with the
> rule is the NULL value. Any ideas why this doesn't work?
>
> Thanks.
>
my guess is by using the rule (IN ('Y','N')) - and that because you have said
ONLY Y,N values are allowed. It is essentially a check constraint in other
databases. And I would consider any other behavior a bug.
--
Michael Austin
Database Consultant
Domain Registration and Linux/Windows Web Hosting Reseller
http://www.spacelots.com
[Back to original message]
|