Hi
Le 19/06/2011 04:27, lover boi a écrit :
> SELECT
>MY_FUNCTION(...) AS my_function,
>CASE WHEN my_function = '...' THEN '...' ELSE '...' END
> ...
> ...
WITH
T AS
(SELECT MY_FUNCTION(...) AS my_function, ...
)
SELECT CASE WHEN my_function = '...' THEN '...' ELSE '...' END
...
...
A +
This message has been digitally signed by the sender.
Re___GENERAL__Referencing_function_value_inside_CASE__WHEN.eml
Description: Binary data
Hi-Tech Gears Ltd, Gurgaon, India
Sent using "PostMaster" by QuantumLink Communications
G
On Sun, Jun 19, 2011 at 10:45:12AM +0800, lover boi wrote:
> In the following statement, does the custom function get executed twice?
>
> SELECT
> MY_FUNCTION(...),
> CASE WHEN MY_FUNCTION(...) = '...' THEN '...' ELSE '...' END
Yes
> If so, is there a way I can make it execute once? I tried
Hello
2011/6/19 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
You can try using a CTE/With clause. Failing that use a function with SELECT
INTO...
On Jun 18, 2011, at 22:45, lover boi wrote:
> Hi,
>
> In the following statement, does the custom function get executed twice?
>
> SELECT
> MY_FUNCTION(...),
> CASE WHEN MY_FUNCTION(...) = '...' THEN '..
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
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