0

如何使用 PL/SQL 制作电子邮件的可变主题?

目前,我使用一个常量字符串作为主题:

'Open Action items for review'

我需要将其修改为:

'Open Action items for review Day 5'  -> If the action item is on 5th day since opening.

或者:

'Open Action items for review Day 10' -> If the action item is on 10th day since opening.

我怎样才能完成这项任务?

4

1 回答 1

0

示例功能:

CREATE OR REPLACE FUNCTION doit
    (days as VARCHAR2) 
RETURN VARCHAR2
IS
BEGIN 
    RETURN 'Open Action items for review Day ' || days;
END doit;

如何调用:

BEGIN
    DBMS_OUTPUT.PUT_LINE('Subject: ' || doit(5));
END;
于 2018-08-18T08:54:55.877 回答