|Subject||Re: [firebird-support] Cursor|
|Author||Ann W. Harrison|
> Dion wrote:I replied:
>>How do I join 2 tables in a stored procedure using firebird. Assigning
>>cursors to variables and doing a join works in MSQL. Can I do this in FB?
> Cursors are part of stored procedures in V2. But why not just use theDion wrote:
> normal join syntax?
>Just as feedback to the developers, why can't you use a normal SQL join?
> No can do. Where can I get the syntax for cursor declaration and use. I am
> using V2.
If there's a problem, perhaps it should be addressed more generally.
In a more helpful line, you should check the V2.0 release notes for
"Explicit Cursors" - here's a section of the article:
DECLARE [VARIABLE] <cursor_name> CURSOR FOR ( <select_statement> );
FETCH <cursor_name> INTO <var_name> [, <var_name> ...];
DECLARE RNAME CHAR(31);
DECLARE C CURSOR FOR ( SELECT RDB$RELATION_NAME
FROM RDB$RELATIONS );
WHILE (1 = 1) DO
FETCH C INTO :RNAME;
IF (ROW_COUNT = 0) THEN