Re: Using Variables Within Views
Posted in 1995
Dave Cook <davec@excelsis.demon.co.uk> wrote:
>Please can you help?
>
>Informix RDS 4.11 SE 5.0
>
>I am currently trying to develop a 'view' to form part of a security
>system for an application, to allow a user to only access certain rows within a
>table. My initial idea was to create the view as follows (simplified):
>
>CREATE VIEW view_name AS>SELECT table1.* FROM table1, table2
>WHERE table1.col1 = table2.col1 AND
>table2.col2 = USER
>
>This gives the following error:
>-217: column(user) not found in any table in the query>
>Does anyone have a solution as to how I can use variables i.e. USER, within
>a 'view'?
>
>Many thanks for your help,
>
>--
>Dave Cook
We Have the same problem on Online 5.00, but not on Online 4.10 (which is
installed on another machine).
This also happens with other built in functions (time, today...).
We also used views like that in security schemes, and becouse of this
bug, now we can't.
Informix Italia and our dealer say they haven't heard of this bug...
Marco.
........................................................................
tear along dotted line!
marco greco mar.greco@agora.stm.it
Work Achea Srl tel 39 95 503117 / 447828 Pbx
Catania, Italy fax 446558