What is the syntax required for the creation of a cursor?
Answer / prasad
Example For cursor Syntax:
Declare Cursor:
EXEC SQL DECLARE CUST_ITM CURSOR
FOR
SELECT
OWN_CUS_NO,
OWN_CUS_ITM_SUF_NO
FROM
NPJXTII
WHERE SCK_NO = :SCK-
NO
AND SCK_DT = :NPS-ORIG-TRANS-
DT
AND SCK_LN_ITM_SEQ_NO = :SCK-LN-ITM-SEQ-
NO
END-
EXEC.
Open Cursor:
EXEC SQL OPEN CUST_ITM
END-EXEC.
Fetch Cursor:
EXEC SQL FETCH CUST_ITM
INTO :OWN-CUS-NO,
:OWN-CUS-ITM-SUF-NO
END-EXEC.
Close Cursor:
EXEC SQL CLOSE CUST_ITM
END-EXEC.
Is This Answer Correct ? | 12 Yes | 1 No |
While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?
What is correlated subquery?
What is a page in db2?
can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?
What do you mean by NOT NULL WITH DEFAULT? When will you use it?
What's the Maximum Length of SQLCA and what's the content of SQLCABC?
PLAN IS EXECUTABLE AND PACKAGE IS NOT EXECUTABLE . THEN WHAT IS THE USE OF PACKAGE?
2 Answers Tech Mahindra, Wipro,
If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1.select Ename from EMP wher Ename = 'raghava' 2.Select count(*) from EMP where Ename = 'raghava' What is SQLCODE shown up in SPUFI
What is explain plan in db2?
how to check the table is empty or not?
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
Define db2.