• MotivateMan1394 (5/3/2015)


    Hi again

    I have 2 Functions in my Query. (then 2 columns in my query's output)

    Function 1 : calculate a value on check a state field. (get values from 2 tables)

    Function 2 : is a case that choose a Value from Filed a or field b . (based on ... )

    Then Sometimes I need to sort my query on base of one of these funcs' Value. ... Order By ... And that time Performance Really Dead .:crazy:

    (The funcs are on subquery and I sort the upper query on function's output in subquery)

    Is there any methodologhy that I Avoid functions, Or I should Rewrite the query And Replace Functions with joins ...And what about order fields?

    Thank you

    Can you post the functions' code, preferably with full DDL and sample data in the form of an insert statement? Also it is probably better to start a new thread on this to catch wider audience.

    😎