您好
Oracle 存储过程是在添加数据集时,设置类型为 Text
然后在过程查询语句中输入查询语句,示例如下:
创建存储过程:
- create or replace FUNCTION DT_GETEMPLOYEECITY (employee_id IN NUMBER, addedIndex IN NUMBER)
- RETURN VARCHAR2 AS
- CITYNAME VARCHAR2(50 char);
- ADDRESS_ID NUMBER(8,0);
- new_employee_id NUMBER(8,0);
- BEGIN
- new_employee_id := employee_id + addedIndex;
- Select ADDRESSID into ADDRESS_ID FROM EMPLOYEE WHERE new_employee_id=EMPLOYEEID;
- select CITY into CITYNAME from ADDRESS WHERE ADDRESS_ID=ADDRESSID;
- IF CITYNAME IS NOT NULL THEN
- return CITYNAME;
- END IF;
- END DT_GETEMPLOYEECITY;
复制代码 查询语句输入:
- SELECT *
- from address
- where city = DT_GETEMPLOYEECITY(:EmployeeID, :IncrementNumber)
复制代码
|