Selfmade functions in Oracle

General discussion forum about all databases other than SqlBase.
yabespatz

Selfmade functions in Oracle

Post by yabespatz » 16 Mar 2010, 18:14

Hello,

i'm trying to migrate a teamdeveloper application from sqlbase to oracle.

I tried to build those functions that doesn't exist in oracle myself:

if_char (= @if in sqlbase):

create or replace function "IF_CHAR"
(p_n in NUMBER,
p_s1 in char,
p_s2 in char)
return char as erg char(30);
begin
if (p_n = 0 or p_n is NULL) then erg := p_s2;
else erg := p_s1;
end if;
RETURN erg;
end;

example: select if_char(n1,'one','two') from test into :sTest

there is no problem in sqltalk, but in TD i must declare :sTest as long string, otherwise sTest is empty after fetch.

Can anyone help?

herve

Re: Selfmade functions in Oracle

Post by herve » 23 Mar 2010, 17:06

Hello,

A defect is opened : TD-9576.

Regards

Hervé

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 2 guests