on 2014 Apr 14 11:57 PM
Hello!
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
as
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)
begin
select @sale_id, @product
end
But nothing happens ... what am I wrong?
Request clarification before answering.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
46 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.