Subject RE: [firebird-support] How can a stored procedure construct a string made up of multiple row data?
Author Jeff Dunlap
Alan McDonald <alan@...> wrote: > CREATE PROCEDURE NEW_PROCEDURE
> returns (
> cities varchar(2000),
> as
DECLARE tmpcity VARCHAR(50);
> begin
cities = '';
> FOR select city_tbl.city from city_tbl into :TMPCITY DO BEGIN
cities = :cities||'['||:tmpcity||']';
END
exit;
> end^

Alan
PS this is terrible design.
Thank you very much. Your code worked just fine but I had to comment out the exit statement.
...
end
/*exit;*/
suspend;
end
Keeping the exit statement resulted in null being returned.



Recent Activity

15
New Members

Visit Your Group
SPONSORED LINKS

Computer telephony
Portable computer
Technical support software
Technical support
Computer telephony integration

Search Ads
Get new customers.
List your web site
in Yahoo! Search.

Sitebuilder
Build a web site
quickly & easily
with Sitebuilder.

Yahoo! Groups
Start a group
in 3 easy steps.
Connect with others.



.





---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.

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