Subject Re: Using COMPUTED fields to provide lookup results and allow backup/restore
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, Raymond Kennington
<progsol@c...> wrote:
> (I am amazed that the language allows for something that appears to
be
> very useful but is not functioning as described or is considered
poor
> design.)

I don't know when and for what this feature was implemented, but I
incline to treat it at least as incomplete.

> Do you think I should use the client software (Delphi, in my case)
to
> do the lookup in order to display the looked-up value of a
> lookup-field?

If I right understand you, let's say you have table

Table T1 (
ID Int Not Null Primary Key,
Name Varchar (80)
)

and

Table T2 (
ID Int Not Null Primary Key,
T1_ID Int,
Name Varchar (80),
[attributes]
Constraint T2_T1_FK Foreign Key (T1_ID) References T1)

and you want present to user

T2.Name, T1.Name, [attributes]

Make it by

Select T2.Name T1Name, T1.Name T2Name, ...
From T2 Inner Join T1 On T1.ID=T2.T1_ID
Where [conditions]

it will be much faster and reliable. If relationship allows not to
have corresponded row in T1, use Left Join instead of Inner.

Best regards, Alexander.