[GENERAL] Referencing function value inside CASE..WHEN

2011-06-18 Thread lover boi
Hi, In the following statement, does the custom function get executed twice? SELECT MY_FUNCTION(...), CASE WHEN MY_FUNCTION(...) = '...' THEN '...' ELSE '...' END ... ... If so, is there a way I can make it execute once? I tried this but it gave me a "Column my_function does not exist" e

[GENERAL] Referencing function value inside CASE..WHEN

2011-06-18 Thread lover boi
Hi, In the following statement, does the custom function get executed twice? SELECT MY_FUNCTION(...), CASE WHEN MY_FUNCTION(...) = '...' THEN '...' ELSE '...' END ... ... If so, is there a way I can make it execute once? I tried this but it gave me a "Column my_function does not exist" e