|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Declare cursor problem
Hey,
Recently I’m using Firebird, great database only little in documentation. At the moment I’m using the IB 6.0 documentation from the firebird site, only I think these are outdated? Some statements just don’t seem to work in Firebird 1.5, like some of the stored procedures I’ve found in these books. For example: “Set Term ^;” and more important I don’t seem to get cursor statements working in Firebird (not even when using the same example) Could someone tell me what I’m doing wrong? Hesder For example a cursor statement I’ve tried to convert from oracle to Firebird 1.5 :CREATE PROCEDURE get_records_10monsteroverzicht( session_id VARCHAR(25), group_name VARCHAR(25), date_from VARCHAR(25) ) AS BEGIN declare c_template CURSOR for select tmplt_name from ip_smpl_grp_DETAIL where smpl_grp_name = group_name ORDER BY tmplt_name; ...how to use cursor in firebird?... END |
|
#2
|
||||
|
||||
|
Quote:
SET TERM is only used by client tools. What are you using to connect and run your scripts? Quote:
Firebird doesn't support a CURSOR, it does support cycling through resultsets via a FOR SELECT construct: FOR SELECT tmplt_name from ip_smpl_grp_DETAIL where smpl_grp_name = group_name ORDER BY tmplt_name INTO :variable_name DO ... loop ... With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Declare cursor problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|