Subject Re: [firebird-support] Selectable procedure and join
Author Daniel L. Miller
Ivan Prenosil wrote:

>>>Views need something "solid" to look onto :). If you need such
>>>functionality, create a simple selectable SP instead of view. Something
>>>like this:
>>>
>>>
>>In my case I do need an View that does contain all columns from an
>>table (but restricting the Rows). This table does have lots of
>>columns, an SP would be very inconvenient to write.
>>
>>
>
>If the SP returns only one value, it can be included in the select list
>of the view as subquery. E.g.
>
>Create View V (id, a,b) As
> SELECT id, a, (select x from MySP(tab.id)) FROM tab;
>
>
Doesn't that result in

Create View V (id, a,b) As
SELECT id, a, (select x from MySP(tab.id)) FROM tab;

Dynamic SQL Error SQL error code = -206 Column unknown X At line ?,
column ??.

--
Daniel