Subject Re: [firebird-support] Stored Procedure Only Returning 1st row
Author Nick Upson
You are missing the begin, end for the loop

In article <d25pbu+qmb6@...>, Rfrieband wrote:
> FOR
> SELECT PATIENT.PTID, PATIENT.LASTNAME,
> PATIENT.FIRSTNAME, PATIENT.MIDNAME,
> CAST(PATIENT.BIRTHDATE AS TIMESTAMP) AS BIRTHDATE,
> PTADDRESS.ADDRESS, PTADDRESS.CITY, PTADDRESS.STATE,
> PTADDRESS.ZIP
> FROM PATIENT, PTADDRESS
> WHERE UPPER(PATIENT.LASTNAME) LIKE UPPER(:LNAME||'%')
> AND UPPER(PATIENT.FIRSTNAME) LIKE UPPER(:FNAME||'%')
> AND PATIENT.PTID=PTADDRESS.PTID
> ORDER BY PATIENT.LASTNAME, PATIENT.FIRSTNAME
> INTO :PTID, :PLNAME, :PFNAME, :PMNAME, :PBDAY,
> :PADDRESS, :PCITY, :PSTATE, :PZIP
> DO
begin
> SUSPEND;
end
>
> END
>

--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly