Skip to Content
avatar image
Former Member

Powerdesigner 16.6: Procedures in Oracle 11g

I have an extensively modified xdb file for Oracle 11g (11.2.0.4)

The resulting file has errors:

- does not contain the procedure name

- does not include comments

Here is an example of the output:

create or replace function FW_TICKET_STATUS_HELPER(TICKET_STATUS IN varchar2)
RETURN sys.odcivarchar2list
AS
BEGIN IF (ticket_status = 'NA') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'NANS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'NAS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'ANS') THEN
RETURN sys.odcivarchar2list ('Adv-Unsettled','Adv-P.Settled');
END IF; IF (ticket_status = 'AS') THEN
RETURN sys.odcivarchar2list ('Adv-Settled','Adv-P.Settled');
END IF; IF (ticket_status = 'NS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-P.Settled','Adv-UnSettled','Adv-P.Settled');
END IF; IF (ticket_status = 'S') THEN
RETURN sys.odcivarchar2list ('Adv-Settled','Adv-P.Settled','Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'A') THEN
RETURN sys.odcivarchar2list ('Adv-Unsettled','Adv-P.Settled','Adv-Settled');
END IF; RETURN NULL;
END;
/

and here what the results should be:

-- ============================================================================
-- Procedure: fw_ticket_status_helper
--
-- Author: Peter Isotupa dbcSMARTsoftware Inc.
-- Translation: Murray Sobol, dbcSMARTsoftware Inc.
-- Purpose: Converts ticket status to a list of values
-- it corresponds to
--
-- Last Modified: October 29, 2012
-- Parameter(s): ticket_status varchar2(10)
-- Return Code(s): Inline table-valued function
-- ============================================================================ CREATE FUNCTION fw_ticket_status_helper
(ticket_status IN varchar2)
RETURN sys.odcivarchar2list
AS
BEGIN IF (ticket_status = 'NA') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'NANS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'NAS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'ANS') THEN
RETURN sys.odcivarchar2list ('Adv-Unsettled','Adv-P.Settled');
END IF; IF (ticket_status = 'AS') THEN
RETURN sys.odcivarchar2list ('Adv-Settled','Adv-P.Settled');
END IF; IF (ticket_status = 'NS') THEN
RETURN sys.odcivarchar2list ('Not Adv-Unsettled','Not Adv-P.Settled','Adv-UnSettled','Adv-P.Settled');
END IF; IF (ticket_status = 'S') THEN
RETURN sys.odcivarchar2list ('Adv-Settled','Adv-P.Settled','Not Adv-Settled','Not Adv-P.Settled');
END IF; IF (ticket_status = 'A') THEN
RETURN sys.odcivarchar2list ('Adv-Unsettled','Adv-P.Settled','Adv-Settled');
END IF; RETURN NULL;
END;
/

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers