Comments
Every stored procedure should have a commented header which describes the basic functionality, author, calling applications, and change history.
For example:
/*
Stored Procedure: spLocal_RptMfgDaily
Author: Matt Wells (MSI)
Date Created: 04/23/02
SP Type: Model 603
Editor Tab Spacing: 4
Description:
=========
This procedure generates the data for a daily manufacturing report.
CALLED BY: RptMfgDaily.xlt (Excel/VBA Template)
Revision Date Who What
======== ===== ==== ====
0.1 5/17/02 MKW Added new production counter
*/
There should be a tons of comments describing the purpose of each section of code, and major sections should be divided by a sub-header.
For example,
/*********************************************************************************
* Section 1 *
*********************************************************************************/