Create a View From A Select Statement Generated in A Cursor--Stored Proc

Database

Create a View From A Select Statement Generated in A Cursor--Stored Proc

Hi.

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

Row3---,col3

Row4---,col4

Row5--- From table A;

How do I create a view for this select statement using stored procedure dynamic sql?

- Shraddha.

1 REPLY

Re: Create a View From A Select Statement Generated in A Cursor--Stored Proc

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.