Hi all,
Pls help me in UDF,DB is Oracle.
I did the following steps but not able to get in Impromtu.
1)Created this function in DB.
CREATE OR REPLACE function check_numeric(xvar varchar2) return varchar2 as
yn varchar2(1) := 'Y';
nvar number := 0;
begin
select xvar/100 into nvar from dual;
yn := 'Y';
return yn;
Exception
When VALUE_ERROR OR INVALID_NUMBER Then
yn := 'N';
return yn;
end;
2)Created a file cogudfor.sql(as this file not exist in bin folder) and pasted the following code.
DECLARE DATABASE FUNCTION check_numeric(STRING)
RETURNS STRING
FUNCTION NAME check_numeric;
3)Changed the impfunct.ini,
check_numeric= in [Common Database Function List] part and added following script in bottom of the file.
[check_numeric]
label=check_numeric
param=1
return=CH1=CH;
text_String_exp
exp=check_numeric(^1)
tip==Syntax:check_numeric(xvar)
tip1=String expression
4)Changed the orfunct.ini,
check_numeric= in [Database-specific Function List] part and added following script in bottom of the file.
[check_numeric]
label=check_numeric
param=1
return=CH1=CH;
text_String_exp
exp=check_numeric(^1)
tip==Syntax:check_numeric(xvar)
tip1=String expression
and connection thro native mode.
pls tell me where i went wrong.
Thanx,
Prapagar.
Pls help me in UDF,DB is Oracle.
I did the following steps but not able to get in Impromtu.
1)Created this function in DB.
CREATE OR REPLACE function check_numeric(xvar varchar2) return varchar2 as
yn varchar2(1) := 'Y';
nvar number := 0;
begin
select xvar/100 into nvar from dual;
yn := 'Y';
return yn;
Exception
When VALUE_ERROR OR INVALID_NUMBER Then
yn := 'N';
return yn;
end;
2)Created a file cogudfor.sql(as this file not exist in bin folder) and pasted the following code.
DECLARE DATABASE FUNCTION check_numeric(STRING)
RETURNS STRING
FUNCTION NAME check_numeric;
3)Changed the impfunct.ini,
check_numeric= in [Common Database Function List] part and added following script in bottom of the file.
[check_numeric]
label=check_numeric
param=1
return=CH1=CH;
text_String_exp
exp=check_numeric(^1)
tip==Syntax:check_numeric(xvar)
tip1=String expression
4)Changed the orfunct.ini,
check_numeric= in [Database-specific Function List] part and added following script in bottom of the file.
[check_numeric]
label=check_numeric
param=1
return=CH1=CH;
text_String_exp
exp=check_numeric(^1)
tip==Syntax:check_numeric(xvar)
tip1=String expression
and connection thro native mode.
pls tell me where i went wrong.
Thanx,
Prapagar.