>>I think you will find that the SQL is compiled and run when the view is queried- this is why a view's SQL property is readonly. The only action that can give this property a new value is CREATE SQL VIEW. This is just conjecture...
>
>
>Wait- that came out wrong. I meant I think you will find that views are compiled when created, not when queried.
I had to see for myself, and you're right. Can't change the select statement nor the source table on the fly. Well, building views programmatically is not a burden to the machine. I think that having one p-view per needed structure/source table is just fine. We can always use cursors if necessary.