K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Oracle Functions

K2 Oracle Service - Functions

Functions support the Select statement and will ONLY return a List Service Object method.


Fig. 1. Oracle Service Object Functions Method

Sample of a Function

Function that takes in the Student ID, then concatenates the Name and the Surname

Copy Code   

  

create or replace

FUNCTION FC_STUDENTREAD

(

  p_StudentID IN NUMBER

)  RETURN VARCHAR2

IS

  o_FIRST_NAME VARCHAR(20);

  o_LAST_NAME VARCHAR(20);

BEGIN

  SELECT FIRST_NAME, LAST_NAME

  INTO o_FIRST_NAME, o_LAST_NAME

  FROM STUDENT

  WHERE STUDENT_ID = p_StudentID;

  RETURN CONCAT(o_FIRST_NAME, o_LAST_NAME);

END FC_STUDENTREAD;

 

 

 


K2 blackpearl Help 4.6.10 (4.12060.1690.0)