Icon View Thread

The following is the text of the current message along with any replies.
Messages 31 to 32 of 32 total
Thread Sorting on Alphanumeric Fields
Fri, Jun 3 2011 12:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Fascinating. I'm especially gobsmacked by the fact that a generated
column can use the function but a computed one can't. I hadn't realised
there was a difference or if Tim had told me I'd forgotten. >>

COMPUTED columns are re-computed client-side for remote
sessions/client-server, and they don't have access to the database catalog
for resolving user-defined functions.  Therefore, they can only use the
built-in functions in the engine.

GENERATED columns are re-generated on INSERT/UPDATE at the server-side, so
they have complete access to the database catalog.

You can test this by doing the following:

SELECT
Column1+Column2 AS ComputedExpression,
MyUDF(Column1) AS GeneratedExpression
FROM MyTable

Make sure to request a sensitive result set, and then view the differences
in how the two expressions are re-computed when you modify Column1.  The
ComputedExpression will update in real-time as you modify Column1, whereas
the GeneratedExpression will only change once you post any modifications.

--
Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 3 2011 1:55 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Reading it I think I've seen that explanation before. I'm sure that at some point it, like many other things, will finally sink in.

Roy Lambert
« Previous PagePage 4 of 4
Jump to Page:  1 2 3 4
Image