Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 18 total
Thread Computed Field and functions error
Fri, May 6 2016 12:17 PMPermanent Link

Rolf Frei

eicom GmbH

ALTER TABLE "VideoList"
ALTER COLUMN "CheckStateDesc" AS VARCHAR(25) COLLATE "ANSI_CI" COMPUTED ALWAYS AS CheckStateText(CheckState)

I try to run this statement but it fails with an error: "ElevateDB Error #700 An error was found in the statement at line 2 and column 83 (Invalid expression CheckStateText found, user-defined function references not allowed)"

As per documentaiton it should be valid to use a user defined function in a computed field:
>>Generated and Computed Columns
Generated columns are expression columns that are stored in each row and updated automatically when the row is updated. Computed columns are expression columns that are virtual and are evaluated any time any dependent columns are updated. Both can contain references to any system functions, as well as user-defined functions that can, in turn, execute SQL statements (see SQL/PSM support below). Also, generated and computed columns can be indexed, meaning that they can be used to index columns that are not normally capable of being indexed, such as CLOB and BLOB columns.<<

Why can't I use my function CheckStateText here?
Fri, May 6 2016 1:49 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rolf


I can't find the part of the manual you've quoted but that aside I don't think we've ever been able to use UDFs in COMPUTED columns - you can in GENERATED (I think)

Roy Lambert
Fri, May 6 2016 1:55 PMPermanent Link

Rolf Frei

eicom GmbH

Fri, May 6 2016 6:48 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Rolf,

Roy is right and the manual is wrong - you can use UDFs with GENERATED but not with COMPUTED columns, because COMPUTED columns are evaluated on the client-side.

--
Fernando Dias
[Team Elevate]
Sat, May 7 2016 3:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando


Thanks - I knew there was a reason just I'd forgotten it (again)

Roy Lambert
Sat, May 7 2016 3:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rolf


I would regard that as sales literature rather than the manual, and sales literature should always be regarded as a pious hope rather than reality - even in Tim's case Smiley


Roy Lambert
Sun, May 8 2016 10:36 AMPermanent Link

Rolf Frei

eicom GmbH

Ouch, thats not a good marketing than. They promise features they don't realy support. This brings some of a negative fealings about Elevate. I hope Tim will say anything about this issue. I can't realy understand, why it shouldn't wok for computetd fields at all, as it can be used in a Select statement very well. So I hope this is a oversight by Tim and he will correct this.
Sun, May 8 2016 2:00 PMPermanent Link

Uli Becker

Rolf,

> I would regard that as sales literature rather than the manual

Sorry, but that's just nonsense.

> Ouch, thats not a good marketing than. They promise features they don't realy support.

You shouldn't draw conclusions from that post.

Uli


Mon, May 9 2016 4:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

> > I would regard that as sales literature rather than the manual
>
>Sorry, but that's just nonsense.

Do you regard it as the manual then? If not how would you regard it.

>> Ouch, thats not a good marketing than. They promise features they don't realy support.
>
>You shouldn't draw conclusions from that post.

Yes you should, but the conclusion you should draw is, assuming you're an owner of the product, check the manual not the sales literature. Strangely enough that's what I did and couldn't find the text Rolf quoted which is why I asked him where he found it.

Its also possible to check these newsgroups and you'll find questions of this nature having been answered before. Here's the response from Tim way back in 2008

<<They can refer to any built-in functions and any columns within the same table.  Currently they cannot use UDFs, due to client-side restrictions for remote sessions.>>

That would indicate the page has been wrong for around 8 years, or was written when Tim suffered a momentary memory lapse. Now its been raised I expect Tim will correct the erroneous page.

Roy Lambert
Mon, May 9 2016 8:55 AMPermanent Link

Uli Becker

Roy,

I won't discuss this further, but you are imputing bad intentions to Tim
- and that's nonsense.

Probably you are annoyed by a recent discussion with Tim, but I think
it's not a good idea to create a bad atmosphere here because of that.

Uli
Page 1 of 2Next Page »
Jump to Page:  1 2
Image