Subject | Re: [firebird-support] Getting underlying table |
---|---|
Author | Ivan Prenosil |
Post date | 2004-02-06T15:25:07Z |
> How can I get the name of the physical table accessed by an QueryEither analyze the source code of view (rdb$view_source field in rdb$relations table),
> which is running against an view. I'm using the API.
>
> Example
>
> Create Table SampleTable ( ... )
>
> Create View SampleView as Select .. FROM Table ...
>
> I'm running "SELECT * from Sample View"
>
> By looking at "alias_name" I can detect the Views Name "SampleView"
> from the prepared statement. But, I want to know that the data comes
> from "SampleTable".
or look at rdb$dependencies table (but it will not distinguish which column
belongs to what table if the view contains join of several tables).
Ivan