Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread User defined functions in column COMPUTED ALWAYS AS
Fri, Jan 17 2014 1:50 AMPermanent Link

Adam Brett

Orixa Systems

This is possible:

CREATE TABLE MyTable
ID INTEGER DEFAULT MyFunction(),
...

But this is not possible:

CREATE TABLE MyTable
ID INTEGER COMPUTED ALWAYS AS MyFunction(ID),
...

It would be BRILLIANT if it was possible. Sorry if this has been discussed before.
Fri, Jan 17 2014 2:43 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< But this is not possible:

CREATE TABLE MyTable
ID INTEGER COMPUTED ALWAYS AS MyFunction(ID),
..

It would be BRILLIANT if it was possible. Sorry if this has been discussed
before. >>

Use GENERATED instead.  COMPUTED expressions must be able to be evaluated on
the client-side, so they cannot contain other database schema object
references because the client-side does not have access to, or the ability
to deal with, complex evaluations like that.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Jan 18 2014 12:20 AMPermanent Link

Adam Brett

Orixa Systems

>>Use GENERATED instead.  

Smile

thanks, this hugely simplifies some stuff for me!
Image