Subject | Can any one help me to fetch the next record using cursor |
---|---|
Author | Kapil Patil |
Post date | 2006-01-16T10:17:27Z |
Following is the stored procedure in FIREBIRD 2.0 BETA...
As Per Standard Syntax of CURSOR the following procedure gives only
first record from the recordset..
Can any one help me to fetch the next record using cursor
It will better if you provide small example using cursor
Thanks in Advance..
==========================================================================
SET TERM !! ;
CREATE OR ALTER PROCEDURE GETALLTABLES RETURNS (TABLENAME VARCHAR(255))
AS
DECLARE C CURSOR FOR (SELECT RDB$RELATION_NAME FROM RDB$RELATIONS);
BEGIN
OPEN C;
WHILE ( 1=1) DO
BEGIN
FETCH C INTO :TABLENAME;
if(row_count=0) then leave;
SUSPEND;
END
CLOSE C;
END !!
SET TERM ; !!
Commit;
Execute procedure getalltables;
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
As Per Standard Syntax of CURSOR the following procedure gives only
first record from the recordset..
Can any one help me to fetch the next record using cursor
It will better if you provide small example using cursor
Thanks in Advance..
==========================================================================
SET TERM !! ;
CREATE OR ALTER PROCEDURE GETALLTABLES RETURNS (TABLENAME VARCHAR(255))
AS
DECLARE C CURSOR FOR (SELECT RDB$RELATION_NAME FROM RDB$RELATIONS);
BEGIN
OPEN C;
WHILE ( 1=1) DO
BEGIN
FETCH C INTO :TABLENAME;
if(row_count=0) then leave;
SUSPEND;
END
CLOSE C;
END !!
SET TERM ; !!
Commit;
Execute procedure getalltables;
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]