RDBPROD: CREATE MODULE fails with RDB-E-NO_META_UPDATE and RDB-E-NO_DUP (Doc ID 1380439.1)

Last updated on AUGUST 09, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version 7.1 and later
HP OpenVMS Itanium
HP OpenVMS Alpha

Symptoms

When executing the following CREATE MODULE, an error is encountered:

SQL> CREATE MODULE my_functions
cont> LANGUAGE SQL
cont> -
cont> -- Define a stored procedure.
cont> --
cont> FUNCTION client_M (
cont> IN :p_customer DOM_1,
cont> IN :p_client DOM_2,
cont> IN :p_date DOM_3)
cont> RETURNS DOM_3;
cont> BEGIN
cont>
cont> DECLARE :maxp DOM_3;
cont>
cont> SELECT
cont> MAX(COALESCE(C.DATECOL,CAST('17-NOV-1858' AS DATE VMS)))
cont> INTO
cont> :maxp
cont> FROM ALL_CUSTOMERS C
cont> WHERE C.CUSTOMER = :p_customer
cont> AND C.CLIENT = :p_client
cont> AND C.DATE <= :p_date;
cont>
cont> RETURN :maxp;
cont>
cont> END;
cont> END MODULE;
%RDB-E-NO_META_UPDATE, metadata update failed
-RDB-E-NO_DUP, index field value already exists; duplicates not allowed for RDB$PARAM_ROUT_ID_POS_NDX

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms