Subject Re: [firebird-support] use variable cursors in PSQL
Author Thomas Steinmaurer
> In a stored procedure I use two cursors to compare two result set row by row.
> I want to use the same stored procedure for different tables and alter only the table in the cursor.
> Is there a way to alter the tabel name in a cursor?

Not in an explicit cursor declaration, but you could use the old style
for iterating through a result set in combination with EXECUTE STATEMENT.

-- build your sql statement here ...
for exexute statement <your_sql_statement> into ... do

Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
My blog: