How to resolve -504 sql code in DB2?

Answers were Sorted based on User's Feedback



How to resolve -504 sql code in DB2?..

Answer / kk

Hi,
-504 is cursor not declared error.may be cursor name
misspeled also coming this error.

Is This Answer Correct ?    17 Yes 0 No

How to resolve -504 sql code in DB2?..

Answer / anandrao

There are following possibilities to this issue to come,
1) Cursor is not declared in application program or
in stored procedure depending on where it is used.
Soln - Declare the cursor in application
program or in stored procedure depending on where it is
used.
2) Cursor spelling is not correct which you are
going to open or fetch.
Soln - Check the name used and correct.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More DB2 Interview Questions

when does the SQL statement gets executed when you use cursor in the application programming ?

3 Answers   IBM,


why we create view.

5 Answers  


What is ibm db2 used for?

0 Answers  


What is a PLAN table? How will you use it? Give the various fields of PLAN table?

1 Answers   Accenture,


what is SPUFI ?

2 Answers  






What is Declaration Generator(DCLGEN)?

1 Answers  


COBOL PRECOMPILER ERROR: "XXXXXX" (TABLE) PREVIOUSLY DECLARED OR REFERENCED DCLGEN VARIABLES GETS IMPORTED TWICE FOR ONLY ONE EXEC SQL STATEMENT. WHAT COULD BE THE PROBLEM?

1 Answers  


I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?

6 Answers   Perot Systems,


What is the difference between IN subselects and EXISTS subselect?

1 Answers   HCL, PreVator, TCS,


What is db2 connect?

0 Answers  


What are catalog tables in db2?

0 Answers  


What is the difference between Primary key and unique index?

6 Answers  


Categories