cancel
Showing results for 
Search instead for 
Did you mean: 

User defined scalar function returns zero rows

Former Member
0 Kudos

Hi,

I have created the following simple function.

CREATE FUNCTION FUNCTION_MUL(IN_VAR INT)

RETURNS RESULT INT LANGUAGE SQLSCRIPT

AS

BEGIN

RESULT := :IN_VAR * :IN_VAR;

END;

I call this function as  SELECT FUNCTION_MUL(2) as RESULT FROM DUMMY;

I always get zero errors returned.

Kindly help me in resolving it.

Thanks & Regards,

Monissha

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Well, I'd say that

I always get zero errors returned.

is good, isn't it?

I assume you meant that you get the message "Fetched 0 row(s)", didn't you?

If that's the case, please make sure that there is actually a record present in your DUMMY table and that you are not using e.g. a copy of the DUMMY table that happens to be empty...

- Lars

Former Member
0 Kudos

Lars,

I found that the problem was due to 'DUMMY' table in my own schema.

I resolved it following the thread http://scn.sap.com/thread/3682401

Regards,

Monissha