Subject Re: [firebird-support] More novice stored procedure questions
Author Milan Babuskov
Robert martin wrote:
> SELECT sum(sl.shelfqty), min(spl.PREARRDATE)
> FROM StockLevel sl
> LEFT JOIN SupplyLine Spl on sl.itemref = spl.itemref
> WHERE sl.Itemref = :i_ItemRef
> INTO :Avail, :Due;

Either use FOR SELECT ... DO ... where in this place too.

or

Check if you have values, and if not don't call "suspend":

if (avail is not null) then
suspend;

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org