Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I have a small problem in SQL, I hope someone can help me.

I want a CURSOR - FETCH, but the code did not return anything.

I use ASE 15.0.3, SQL Advantage 11 and the following code:

create procedure sales
declare @sale_id tid
declare @product varchar(80)
declare sales_cur cursor for
select sale_id, product
from sales
where product = 1
open sales
fetch sales
into @sale_id, @product
while (@@sqlstatus = 0)
select @sale_id, @product

But nothing happens ... what am I wrong?

asked 14 Apr '14, 22:57

Arcanomus's gravatar image

accept rate: 0%

closed 15 Apr '14, 02:39

Mark%20Culp's gravatar image

Mark Culp

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 15 Apr '14, 02:39

This forum is for questions about SQL Anywhere. Please refer to the FAQ page and post your ASE question on the ASE forum (link is in the FAQ).

permanent link

answered 15 Apr '14, 02:39

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Apr '14, 22:57

question was seen: 2,001 times

last updated: 15 Apr '14, 02:39