Ok, here is the question.
I need define a cursor having select statement with dynamic where clause.
Here is the detailed requirement in points.
1. Create a stored procedure with parameters which will be part of where clause of cursor in procedure definition/body.
2. This SP will have the cursor a select statement with dynamic where clause.
3. This stored procedure will be executed from a .bat file with parameters.
Please let me know how do I do this in DB2.
Sample code would be of great help