All Forums Database
sdmody83 4 posts Joined 01/12
14 Mar 2012
Create a View From A Select Statement Generated in A Cursor--Stored Proc



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?

- Shraddha.


madhugraju 5 posts Joined 05/11
15 Mar 2012

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.



You must sign in to leave a comment.