Subject | Re: view that depends on selectable procedure not found in RDB$DEPENDENCIES |
---|---|
Author | lmmolinero |
Post date | 2009-09-02T14:52:44Z |
Sorry I made a mistake in the second sentence, it should be:
select * from RDB$DEPENDENCIES
where
RDB$DEPENDENT_NAME='MORTALIDAD'
and RDB$DEPENDED_ON_TYPE=5
But anyway it doesn't work, it seems that this relation (a wiew that uses a selectable stored procedure) is forgotten in the RDB$DEPENDENCIES table.
I can find the missing dependence with a join clause like this:
select
DISTINCT D.RDB$DEPENDED_ON_NAME,F.RDB$RELATION_NAME
from RDB$DEPENDENCIES D
join RDB$RELATION_FIELDS F on F.RDB$FIELD_SOURCE=D.RDB$DEPENDENT_NAME
where D.RDB$DEPENDED_ON_TYPE=5
If someone has another idea or explanation will be appreciate
Thanks
Luis M. Molinero
Las Rozas - Madrid (Spain)
select * from RDB$DEPENDENCIES
where
RDB$DEPENDENT_NAME='MORTALIDAD'
and RDB$DEPENDED_ON_TYPE=5
But anyway it doesn't work, it seems that this relation (a wiew that uses a selectable stored procedure) is forgotten in the RDB$DEPENDENCIES table.
I can find the missing dependence with a join clause like this:
select
DISTINCT D.RDB$DEPENDED_ON_NAME,F.RDB$RELATION_NAME
from RDB$DEPENDENCIES D
join RDB$RELATION_FIELDS F on F.RDB$FIELD_SOURCE=D.RDB$DEPENDENT_NAME
where D.RDB$DEPENDED_ON_TYPE=5
If someone has another idea or explanation will be appreciate
Thanks
Luis M. Molinero
Las Rozas - Madrid (Spain)
--- In firebird-support@yahoogroups.com, "lmmolinero" <soporte@...> wrote:
>
> I'm writing a program to update a database from a structure template.
> I have a problem with a wiew which uses a selectable procedure.
> The name of the wiew is MORTALIDAD and it uses a stored procedure.
> If I execute the sentence:
>
> select * from RDB$DEPENDENCIES
> where
> RDB$DEPENDENT_NAME='MORTALIDAD'
>
> I don't get a row for the stored procedure that the view depends on, and if I execute the sentence:
>
> select * from RDB$DEPENDENCIES
> where
> RDB$DEPENDENT_NAME='MORTALIDAD'
> and RDB$DEPENDENT_TYPE=5
>
> I get no rows at all.
>
> Is it a bug? Am I doing something wrong? Are there another method to find out the dependencies between views and selectable procedures.
>
> Thanks
>
> Luis Miguel Molinero
> Las Rozas - Madrid (SPAIN)
>