Subject Re: [ib-support] Store Procedure Problem
Author Todd Brasseur
Difference is you need the word FOR in front of SELECT

FOR SELECT

You don't end the SELECT statement with an ";"

FOR SELECT house
FROM Town
INTO :House

After Select you need a DO. Then everything after the DO is done for
each record in the select

FOR SELECT house
FROM Town
INTO :House
DO
BEGIN
/* stuff to do for each record */
END


Todder





Zakir Mahomedy wrote:

>
> I created a store procedure which needs to return totals from
> different terminals. It works fine when theres only 1 terminal. If
> there is more then 1 terminal I get an error
>
> "Multiple rows in Single Select" . How do i fix my code to allow for
> multiple rows.
>
> Thank you in advance for any solution.
>
> Here is my store procedure.
>
> ....
>
> AS
>
> BEGIN
>
> SELECT TERMINAL, SUM(TOTAL) FROM DOCKETS
>
> GROUP BY TERMINAL
>
> INTO :TERMINALID, :STOTAL;
>
> SUSPEND;
>
> END
>
> ...
>
>
> |
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>
> [Non-text portions of this message have been removed]
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <http://rd.yahoo.com/M=245454.2994396.4323964.2848452/D=egroupweb/S=1705115386:HM/A=1457554/R=0/*http://ipunda.com/clk/beibunmaisuiyuiwabei>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/>.


--
Todd Brasseur, A.M.A.A.
COMPASS Municipal Services Inc.




[Non-text portions of this message have been removed]