0

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!

2
  • NO_ROWCOUNT is a display toggle specific to nzsql. Are you able to provide a sample procedure where you are looking to suppress a row-count? Apr 9, 2022 at 22:41
  • Hi Rajshekar, this is my sample SP: 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; TQ in advance! Apr 11, 2022 at 0:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.