> I am new to SAP / MAX DB. I am having problem with stored > procedures as > I am unable to find good documentation with detailed examples. > Can anybody guide me how to use cursor inside another cursor > in a stored > procedures or what could be an equivalent to the following PostgreSQL > procedure.
Use DECLARE <cursor name> CUROSR to name the cursor so that you can have more than one cursor open at the same time. Use FETCH NEXT <cursor name> to access a specific cursor (http://www.sapdb.org/7.4/htmhelp/40/1311f72fa511d3a98100a0c9449261/frameset.htm). Pay attention to the way nested WHILE have to be written. If you simply write WHILE $RC = 0, then the end of the first inner loop will also end the outer loop. Daniel Dittmar -- Daniel Dittmar SAP DB, SAP Labs Berlin [EMAIL PROTECTED] http://www.sapdb.org/ -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
