1 year ago
#380329
Megat Shamsul
How to SET NOCOUNT ON/OFF inside a Netezza stored procedure?
Based on NZ documentation, it seems NZSQL equivalent command NO_ROWCOUNT will suppress row count information. But how do I execute/apply it inside a NZ stored procedure?
I've tried to create and executed a NZ SP that contains the command "SET NO_ROWCOUNT" with error "expecting an identifier found a keyword".
My sample code as follows:
CREATE OR REPLACE PROCEDURE MYSCHEMA.MYSP()
RETURNS CHARACTER VARYING(ANY) EXECUTE AS CALLER
LANGUAGE NZPLSQL AS
BEGIN_PROC
DECLARE
iTot INTEGER;
BEGIN
--SET NO_ROWCOUNT;
SELECT COUNT(1) INTO iTot FROM MYSCHEMA.MYTABLE;
RETURN iTot;
END;
END_PROC;
Pls advise.
TQ in advance!
netezza
sp
rowcount
nzsql
0 Answers
Your Answer