Subject | Re: [firebird-support] Views |
---|---|
Author | Ann Harrison |
Post date | 2004-01-02T16:37:14Z |
Nols Smit wrote:
source. The "create view" part is, in its opinion, syntactic sugar
because the rdb$view_source field "knows" that it's part of a create
view statement. The field lists are normalized and put in the
rdb$relation_fields table. You will find the local name of the field in
rdb$field_name and the name of the field in the source table in
rdb$base_field. The internal context identifier is rdb$view_context.
Use the view name and the context identifier to lookup the source table
in rdb$view_relations.
Regards,
Ann
>I got it working except the Create View statements are missing. ForFirebird stores only the computational part of the view in rdb$view
>example, my view named KPI is only showing the following statements:
>
>SELECT codetable.id, codetable.description
> FROM codetable
> WHERE codetable.codetype_id = 2
>
>Instead of:
>
>CREATE VIEW KPIS ( ID, DESCRIPTION)
> AS SELECT codetable.id, codetable.description
> FROM codetable
> WHERE codetable.codetype_id = 2
>
source. The "create view" part is, in its opinion, syntactic sugar
because the rdb$view_source field "knows" that it's part of a create
view statement. The field lists are normalized and put in the
rdb$relation_fields table. You will find the local name of the field in
rdb$field_name and the name of the field in the source table in
rdb$base_field. The internal context identifier is rdb$view_context.
Use the view name and the context identifier to lookup the source table
in rdb$view_relations.
Regards,
Ann