Problem using Views with Multiple tables
Posted in 2003
I have created the following view from 2 tables. When I use the view
the WHERE clause is ignored and all the data is returned i.e.:
select * from view_cur_acad_stat where cur_acad_stat = 10 ;
With single table views the where clause is executed. Am I doing
something wrong or is this a limitation of Informix? I'm working with
Informix v 7.3.
Thanks
Rick
CREATE VIEW view_cur_acad_statAS
SELECT
acad_status_dim.acad_stat_key AS cur_acad_stat_key,
acad_status_dim.acad_stat AS cur_acad_status,
acad_status_dim.acad_stat_desc AS cur_acad_st_desc,
acad_stat_grp_dim.acad_status_grp AS cur_acad_st_grp,
acad_stat_grp_dim.acad_stat_grp_desc AS cur_acad_grp_desc
FROM
acad_status_dim INNER JOIN acad_stat_grp_dim
ON acad_status_dim.acad_stat = acad_stat_grp_dim.acad_stat;
grant ALL ON view_cur_acad_stat TO myusername;