0
CREATE OR REPLACE PROCEDURE CAS.ROWTYPECHECK ( P_APPLICATION_REC  TAPPLICATION%ROWTYPE )
IS
BEGIN
  INSERT INTO "CAS"."VAPPLICATION"
    VALUES P_APPLICATION_REC;
END;

But I'm getting one error while deploying.

Deploy CAS.ROWTYPECHECK

Running
CAS.ROWTYPECHECK - Deploy started.
Create stored procedure returns SQLCODE: -104, SQLSTATE: 42601.
CAS.ROWTYPECHECK: 1: An unexpected token "%" was found following "ON_REC
TAPPLICATION". Expected tokens may include: ",".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.16.53
An unexpected token "%" was found following "ON_REC TAPPLICATION". Expected tokens may include: ",".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.16.53
CAS.ROWTYPECHECK - Deploy failed.
CAS.ROWTYPECHECK - Roll back completed successfully.

DBMS is DB2 V9.1.

I tried using:

CREATE OR REPLACE PROCEDURE <Sechma>.<ProcedureName> 
  (<Record> <table/VIEW>%ROWTYPE)
1

Db2 for LUW 9.1 did not have the Oracle compatibility feature, which was added since v9.7, so you cannot use the PL/SQL dialect. Moreover, the CREATE OR REPLACE syntax or row types were not supported either.

If you wish to use these features, upgrade to a supported version of Db2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.