SQL statement establishes a poetry table and inserts a poem into the table. How to display the four-character grid composed of the first word of each line of poetry with the cursor?

Declare readPoem cursor

for

Select a line of text from a poem

Open and read poetry.

declare @linetext char(25)

declare @str varchar( 10)

set @str= ' '

Get the next one from readPoem to @linetext

While(@@fetch_status=0) starts.

set @ str = @ str+substring(@ line text, 1, 1)

Get the next one from readPoem to @linetext

end

Print (@str)

Turn off reading poetry

Unassign readPoem