Subject RE: [firebird-support] Field computed by a stored proc
Author zedalaye@neuf.fr
Hi all,

This statement :

create table TEST (
  TEST_ID integer not null,
  NAME varchar(80),
  FIRSTNAME varchar(80),
  COMPANY varchar(80),
  FULLNAME computed by
(
(select FULLNAME from SP_GET_FULLNAME (TEST.TEST_ID,
TEST.NAME,
TEST.FIRSTNAME,
TEST.COMPANY)
)
)
);

As suggested by Adam "Compiles" (no SQL error) but the server "infinite
loops" (99% of processor used, I had to kill fbserver process.)

I will create a stored proc to compute this field at select time.

Regards

Pierre Y.


________________________________________
De : firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] De la part de Jason Dodson
Envoyé : vendredi 22 avril 2005 15:42
À : firebird-support@yahoogroups.com
Objet : Re: [firebird-support] Field computed by a stored proc

For a computed field, you are more or less restricted to using the
fields in the current record, any results from a UDF function, and/or
any evaluations contained there of.

In short, I don't believe you can use a recordset in a computed field.
Honestly, thinking about it, most cases, the performance of such a
method would be ... not good.

Jason

zedalaye@... wrote:
> Hi,
>
> How can I create a field computed by a stored proc ?
>
> Create table test (
>   Test_id Integer not null,
>   Name VarChar(80),
>   FirstName VarChar(80),
>   Company VarChar(80),
>   FullName computed by ((select fullname from sp_get_fullname(test_id,
name,
> first_name, company)))
> );
>
> Firebird refuses to compile that statement.
>
> Can you help me ?
>
> Thank you very much, regards,
>
> Pierre Y.
>
>
>
>

> Yahoo! Groups Links
>
>
>

>
>
>
>
>


________________________________________
Yahoo! Groups Links
• To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
 
• To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
 
• Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.