Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Hana Cursor Issue: Not able to use declared variable name "CardName" inside Cursor and getting this error while calling store procedure.SAP DBTech JDBC: [1287]: identifier must be declared: CARDNAME

$
0
0

create procedure test()

AS

BEGIN

DECLARE CardCode nvarchar(200);

DECLARE CardName nvarchar(200);

DECLARE GroupCode nvarchar(200);

BEGIN

DECLARE  CURSOR Acursor FOR SELECT "CardCode","CardName","GroupCode" FROM OCRD where "CardName" = CardName;

OPEN Acursor;

FETCH Acursor INTO CardCode,CardName,GroupCode;

WHILE Acursor::ROWCOUNT = 0 DO

BEGIN

 

  FETCH  Acursor INTO CardCode,CardName,GroupCode ;

  BEGIN

  DECLARE  CURSOR Bcursor FOR SELECT "CardCode","CardName","GroupCode" FROM OCRD where "CardCode" = CardCode;

  OPEN Bcursor;

  FETCH Acursor INTO CardCode,CardName,GroupCode;

  CLOSE Bcursor;

  END;

END;

CLOSE Acursor;

END WHILE;

END;

END;


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>