CREATE PROCEDURE sp_calculate_depreciation_slm ( @session_id varchar(100), @asset_code varchar(50) ) as /* ----------------------------------------------------------------------------- Author : Paras Shah Date : 02-July-2003 ---------------------------------------------------------------------------- */ declare @rowid numeric(24,6), @no_of_days numeric(24,6), @max_days_in_month numeric(24,6), @asset_accumulated numeric(24,6), @depreciation_rate numeric(24,6) declare @depreciation_accumulated_temp numeric(24,6), @first_row_count numeric(24,6) declare @amount numeric(24,6), @depreciation_accumulated numeric(24,6), @asset_wdv_as_on_date numeric(24,6), @writeoff_amt numeric(24,6) set @first_row_count=0 declare curTransaction CURSOR STATIC for select rowid,no_of_days, […]