I have a problem.
I have a cursor with a select statement.
The select statement returns 5 rows.
Row 1-- Select col 1
Row 2 --,col2
Row5--- From table A;
How do I create a view for this select statement using stored procedure dynamic sql?
You will need to declare another cursor and prepare it dynamically with values from your first cursor.
You can create your view following that.
Please refer to the manuals for stored procedures which has details for using the prepare statement.