DECODE .vs IF THEN ELSE (or ELSIF)
From: moshe <Moshe_t_at_yahoo.com>
Date: 30 Mar 2004 09:06:52 -0800
Message-ID: <616be6f6.0403300906.34626f35_at_posting.google.com>
Date: 30 Mar 2004 09:06:52 -0800
Message-ID: <616be6f6.0403300906.34626f35_at_posting.google.com>
Hello,
I have simple function that get char value and according its value
return char value.
Or I can use DECODE like :
Result := DECODE('00','xxx','01','yyy','02','zzz' .... )
My question is consider only to performance - What is the best way ?
Where I
The function can looks like :
IF (InputValue = '00') THEN RETURN 'xxx'
ELSIF (InputValue = '01') THEN RETURN 'yyy'
ELSIF (InputValue = '02') THEN RETURN 'zzz'
and so on...
will get the highest performance ?
Thanks. Received on Tue Mar 30 2004 - 19:06:52 CEST