Subject Re: [firebird-support] Parametrized views?
Author Martijn Tonies
Hello Pepak,

>> What's wrong with a normal VIEW and adding a WHERE
>> clause when you do a SELECT?
>>
> Apart from the fact that it won't work, nothing :-)
>
> Even that simple example of mine would be quite problematic with views;
> essentially, you would have to rewrite all of the view's content into
> your select - that SUM() would need to be outside the view. Of course,
> that is feasible with that example, but just a little more complex
> expression would quickly become infeasible.

Right, the aggregate messes things up ;-)

Have you ever looked at SELECTable Stored Procedures? Those
allow you to pass parameters.

They do have a drawback when the SP is being used in joins though,
they could become slowish.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com