The system is capable of parsing out up to 9 result sets. The ##RSD tag allows the developer the ability to document each of the result sets independently. The ##RSD tag is immediately followed by a number indicating the result set the comment pertains too.
Note: Since a procedure might return more than one result set depending upon the path of execution in the procedure, or could return the same column alias template for multiple paths of execution, it is not uncommon to find the same result set described more than once.
Since the ##RSD is not legal SQL syntax, it must appear between comment tags. The tag may be between multiline comment tags (/* ... */), but only the first line will be read. If the ##RSD line is intended to be a multiline comment, a ##RSD must appear on the line immediately before the text to form part of the comment.
When defining multiple result sets from a given procedure, use the ##RSD tag to define the intent of each result set.
##RSDNumber Comment
Where Number is
the sequential number of the result set associated,
and Comment is
the documentation text to use
-- ##RSD1 The product details result set.
-- ##RSD2 The stock status for each supplier.
During SQL parsing, SQLHelp attempts to determine all result sets returned from the procedure. If there is only one result set, the output file will contain a header labeled Output Recordset. If more than one result set was found, each one will be numbered as in this sample. ##RSD will work equally well for each situation. In the case of a single result set, ##RSD1 is the key. In the case of multiple result sets, the developer should be aware that conditional execution could lead to differences in the expected number of result sets returned (e.g. if a SELECT is executed as part of each branch in an IF block).
