"cursor" must be created with SELECT ... INTO TABLE (Error 1815)

You have tried to use a repackaged cursor as a source for another SELECT statement.