Issue Details (XML | Word | Printable)

Key: CORE-886
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Michael Trowe
Votes: 4
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

SPs in views

Created: 03/Aug/06 09:40 AM   Updated: 22/Jun/11 02:48 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 

Target: 2.5.0


 Description  « Hide
If I want to run a query from a SP with limiting the result-set or with joining other tables, I have to run the query by client or in another SP. But I can' create a view using the SP:

Like:

create view MY_VIEW ( "FIELD_1" )
as
select MY_PROCEDURE."FIELD_1"
  from MY_PROCEDURE('...')


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Valdir Stiebe Junior added a comment - 08/Oct/06 05:11 AM
Yes! Enabling us to create a "stored procedure based editable view" will be nice for reducing the ammount of code in client application.
I will use it for translating updates in deletes or inserts in some cases.

Philip Williams added a comment - 19/Feb/08 11:21 AM
This issue's (886) priority may be "minor" ... but to me the potential coolness factor is "major". Thanks!

Does the existing patch for 2.5 include the ability to do:

SELECT ... FROM a ... join ... EXECUTE BLOCK RETURNS (x ..., y ...) AS BEGIN ... END z ON ...

and create a VIEW from it? Seems like if we can create a view based on a stored procedure that returns rows, basing a view on an anonymous block that does the same would be logically (if not physically, I'm not saying it'd be easy!) similar ... just curious.


Dmitry Yemanov added a comment - 19/Feb/08 11:48 AM
No, there are no plans to support EXECUTE BLOCK inside select expressions.