Question

We're currently working with views and I have to create a view that will allow us to manipulate and insert data. The view will, however, only show data from a specified year, and thus should only allow insertion and manipulation of such. By using with check option, we can ensure that.

My original approach was as follows:

create view FOO as
select * from BAR
where extract(year from BAR.SOME_DATE) = '2011' with check option;

That, however, won't work. I'm getting the following error: "SQL error code = -203. Inappropriate self-reference of column."

On the other hand, when using this:

create view FOO as
select * from BAR
where BAR.SOME_DATE between '2011-01-01' and '2011-12-31' with check option; 

it will work.

I'm using Firebird 2.5 if that matters.

I have absolutely no idea as to why that is, so I'd appreciate every help. Thanks in advance!

Was it helpful?

Solution

This is a bug, and it will be fixed with version 2.5.3.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top