Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split does not work for REPLACE PROCEDURE #691

Open
corncat-liu opened this issue Nov 27, 2022 · 1 comment
Open

Split does not work for REPLACE PROCEDURE #691

corncat-liu opened this issue Nov 27, 2022 · 1 comment

Comments

@corncat-liu
Copy link

The below one REPLACE PROCEDURE is split into multiple as in screenshot

REPLACE PROCEDURE WDP1POMD_OBJECT.TYPE_DO_DELETE(
P_OBJECT_TYPE_CODE VARCHAR(1)) SQL SECURITY CREATOR
#MAIN# :
BEGIN
DECLARE GV_PACKAGE_NAME VARCHAR(50) DEFAULT 'WDP1POMD_OBJECT_TYPE';
DECLARE gv_module_name VARCHAR(50);
DECLARE EXIT HANDLER FOR SQLState '02000'
RESIGNAL SQLSTATE 'T7665' SET MESSAGE_TEXT = '- 20011, Record not found.';
DECLARE EXIT HANDLER FOR SQLException
BEGIN
CALL WDP1POMD_UTIL.omd_fatal_log2(GV_PACKAGE_NAME || '.' || GV_MODULE_NAME, SQLCODE);
RESIGNAL;
END;
SET GV_MODULE_NAME = 'DO_DELETE';

DELETE
FROM WDP1TOMD.OMD_OBJECT_TYPE
WHERE OBJECT_TYPE_CODE = P_OBJECT_TYPE_CODE;
END;

Screen Shot 2022-11-26 at 8 18 11 PM

@andialbrecht
Copy link
Owner

Which SQL dialect is this? I'm only aware of the CREATE OR REPLACE PROCEDURE form, and adding CREATE OR in front of the example statement works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants