Sergio Samayoa wrote : >Thank you Anhaus, but the 255 limit I did found it at:
>http://www.sapdb.org/htmhelp/e0/ed9036dfe4b903e10000009b38f889/frameset.htm >Look at the botom of the page. >It is oudated or bad the online documentation ? I suppose you refer to the following sentence : The statement list must not contain more than 255 SQL statements This does not mean that a database procedure is limited to 255 lines but that at most 255 SQL statements are permitted. The database procedure example from the documentation CREATE DBPROC avg_price (IN zip CHAR(5), OUT avg_price FIXED(6,2)) AS VAR total FIXED(10,2); price FIXED(6,2); hotels INTEGER; TRY SET total = 0; SET hotels = 0 SELECT price FROM tours.room,tours.hotel WHERE zip = :zip AND room.hno = hotel.hno AND roomtype = 'SINGLE'; WHILE $rc = 0 DO BEGIN FETCH INTO :price; SET total = total + price; SET hotels = hotels + 1; END; CATCH IF $rc <> 100 THEN STOP ($rc, 'Unexpected error'); IF hotels > 0 THEN SET avg_price = total / hotels; ELSE STOP (100, 'No hotel found'); consists of 15 lines but contains only 2 SQL statements. Regards, Thomas -- Thomas Anhaus SAP DB, SAP Labs Berlin [EMAIL PROTECTED] http://www.sapdb.org/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
