My purpose was to find the least intrusive way of implementing vertical partitioning as a security measure, for example allowing a vendor to only see his/her records in a billing table. My idea was that a view constrained by a condition on a foreign key would work. In the absence of passing in a parameter, can I join the invoice table to a "ghost" condition table or view that is created at runtime, whereby the condition table contains only the runtime client vendor id? Or do I have to implement a full select or view on the invoice table at runtime? Suggestions?
- Henrik Stephen Woodbridge wrote: > Alex Katebi wrote: > >> The problem with the view is that you can not pass a parameter or variable >> from the outer select to the views select. >> > > Right that is not the purpose of a view. Think of a view as a virtual > TABLE. You can not pass a parameter to a table either. You can just > query the table or view and you CAN query with a parameter in the select > statement. > > select * from <table_or_view> where .... > > Maybe it would be help to restate what you are trying to do. > > -Steve > > >> On Mon, Jun 30, 2008 at 12:49 AM, Igor Tandetnik <[EMAIL PROTECTED]> >> wrote: >> >> >>> "Henrik Bechmann" <[EMAIL PROTECTED]> >>> wrote in message news:[EMAIL PROTECTED] >>> >>>> Thanks Igor! And the SQL statement can be bound to parameters in the >>>> usual ways? >>>> >>> No, not in the view. You can, of course, select from the view (as if it >>> were a table), and _that_ query can be parameterized. >>> >>> Igor Tandetnik >>> >>> >>> >>> >>> _______________________________________________ >>> sqlite-users mailing list >>> [email protected] >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> >>> >> _______________________________________________ >> sqlite-users mailing list >> [email protected] >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- Henrik Bechmann bechmann.ca Webmaster, celos.ca webhosting services _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

