Unanswered: length of cursor name in "DECLARE <cursor_name> CURSOR"
Could some one please share what is the maximum length of cursor name in DB2 9.7.6 as I am facing a strange issue.
the below command runs fine with a specific id
DECLARE CLAIM_TXN_HIST_CURSOR CURSOR FOR SELECT * FROM EWH.CLAIM_TXN_HIST_NICHE_VIEW ORDER BY COMPANY_NO,CLAIM_NO,TRAN_DT,TRAN_TM_REF,TXN_CD WITH UR
but gives the below error when run with my id
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "DECLARE CLAIM_TXN_HIST_CURSOR CURSOR FOR SELE"
was found following "BEGIN-OF-STATEMENT". Expected tokens may include:
with some trial and error found that the below query which is same as above except the length of the cursor name (18 chars) works fine with my id.
DECLARE CLAIM_TXN__CURSOR1 CURSOR FOR SELECT * FROM EWH.CLAIM_TXN_HIST_NICHE_VIEW ORDER BY COMPANY_NO,CLAIM_NO,TRAN_DT,TRAN_TM_REF,TXN_CD WITH UR
Any length above 18 seems to be a problem.
This keeps me wonderin if the cursor name is a user id/group based configurable parameter.
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be