Peter L. Peres wrote: > Cobol is not self-documenting, it is self-obfuscating imho. > SQL is more or less self documenting imho, and I heard that > Ada is even more so (but I never used Ada). Hehe, Peter, - "SQL is more or less self documenting", have a look at real-life SQL200 stored procedure in TSQL, comments were removed: ===================================================== CREATE Procedure AyahAddNewPolyCompsSP @OrderItemId int =0 , @PolyNumber int = 0 , @PolyTypeId int = 0 As DECLARE @PolyId Int SET @PolyId=dbo.AyahGetPolyIdUDF ( @OrderItemId, @PolyNumber ) SET @PolyTypeId=dbo.AyahGetPolyTypeIdUDF ( @OrderItemId, @PolyNumber ) DECLARE @CompQuantity real, @ParentRecId int DECLARE @CompID int,@StageCount int SET @StageCount=1 SET @CompID=0 DECLARE @PId int, @SN int , @PR int , @CI int , @CQ real DECLARE @CompIdSetTab TABLE ( PolyId int , StageNumber int , ParentRecID int , CompID int , CompQuantity real ) DECLARE @NewStageSetTab TABLE ( PolyId int , StageNumber int , ParentRecID int , CompID int , CompQuantity real ) DECLARE @StageSetTab TABLE ( PolyId int , StageNumber int , ParentRecID int , CompID int , CompQuantity real ) INSERT INTO @StageSetTab VALUES (1,1,0,0,1) DECLARE cursStageSet CURSOR DYNAMIC FOR SELECT * FROM @StageSetTab OPEN cursStageSet WHILE @StageCount < 5 BEGIN DELETE @NewStageSetTab FETCH NEXT FROM cursStageSet INTO @PId, @SN, @PR, @CI, @CQ -- print " FETCH_STATUS=" + LTRIM(STR(@@FETCH_STATUS)) WHILE (@@FETCH_STATUS =0) BEGIN DELETE @CompIdSetTab INSERT @CompIdSetTab SELECT * FROM AyahGetCompIdTableUDF(@PolyId,@PolyTypeId,@StageCount,@CI) INSERT @NewStageSetTab SELECT * FROM @CompIdSetTab INSERT AyahPolyComps SELECT * FROM @CompIdSetTab -- print "SN=" + LTRIM(STR (@SN)) + " CI=" + LTRIM(STR(@CI)) + " RCount=" + LTRIM(STR(@@ROWCOUNT)) FETCH NEXT FROM cursStageSet INTO @PId, @SN, @PR, @CI, @CQ END CLOSE cursStageSet DELETE @StageSetTab INSERT @StageSetTab SELECT * FROM @NewStageSetTab -- print " RCount=" + LTRIM(STR(@@ROWCOUNT)) OPEN cursStageSet SET @StageCount=@StageCount+1 END GO ============================================== -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads