Henrik Bechmann <[EMAIL PROTECTED]> wrote: > 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?
You can do CREATE TEMP VIEW to create a filtering view on the fly once vendor id is known. Or, as you suggest, you can create a one-row-one-colum table that would contain the vendor id, and have the view join it in. Update this table with the vendor Id as soon as it's known. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users