by using cursors , we can access particular records from
the table based on some condition, i want to delete those
selected records, how can we write a query for this in the
program?
Answers were Sorted based on User's Feedback
Answer / satty
first declare cursor and select the records you wanted and
then use delete statement with where current of your cursor.
becoz it will help you to delete that particular record
which has been choosed.
if any thing wrong plz intimate
| Is This Answer Correct ? | 8 Yes | 0 No |
Hi Satty
Can you please let us know what command you will use for
delete.
Vaneesh
| Is This Answer Correct ? | 0 Yes | 0 No |
By the way, why to select a signle row using cursor then
delete, if you want to delete all the row mentioned in the
cursor search creteria, simply write a SQL query mentioning
delete where (matching search condition).
| Is This Answer Correct ? | 0 Yes | 2 No |
Cursors can be declared in both working-storage & procedure division, Agreed. But is there any difference? If could you please suggest what is the difference. TIA
What are iseries servers?
What is a composite index and how does it differ from a multiple index?
What is the syntax of SELECT statement when embedded in a COBOL program?
What can the Locate option of the Repair Utility accomplish?
In cursor program perform para varying until 1 by 1 fetch para cursor------close para in the blank what will come for confirming in the database?
What is a DB2 access path?
What is ALTER ?
i have cobol+ db2 program but it contains n number of subprograms for this how many dbrm members i need to mention in bind process
What is correlated subquery?
What is the difference between Where and Having Clause
Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS 200 XYZ 300 PQR 400 MNO WWW 500 CVV ------------- ------------- Now write a query to retrieve all records with CUSTLOC no data.