SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Cursor Fetch Error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sprotson
Yak Posting Veteran

70 Posts

Posted - 03/01/2013 :  05:23:55  Show Profile  Reply with Quote
I am modifying a stored rpocedure that was produced by someone else, designed to check the differences between different versions of items in 1 table.

When running the modified stored procedure I get the following error:

Msg 16924, Level 16, State 1, Procedure sp_AvayaSDKVectorChange, Line 620
Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.

I know that my stored procedure must somehow have a different number of variables from columns, but I have no idea where in the code this is happening.

Any suggestions?

USE [SpotlightAACC]
GO
/****** Object: StoredProcedure [dbo].[sp_AvayaSDKVectorChange] Script Date: 03/01/2013 09:50:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[sp_AvayaSDKVectorChange]
@in_startdate datetime,
@in_enddate datetime
as
begin
declare @bcid_curr int
declare @bcversion_curr int
declare @vectornumber_curr varchar(3)
declare @vectorname_curr varchar(15)
declare @multimedia_curr varchar(3)
declare @lock_curr varchar(3)
declare @attendant_curr varchar(3)
declare @meet_me_conf_curr varchar(3)
declare @native_name_1_curr varchar(36)
declare @native_name_2_curr varchar(36)
declare @native_name_3_curr varchar(36)
declare @native_name_4_curr varchar(36)
declare @native_name_5_curr varchar(18)
declare @native_name_scripts_curr varchar(8)
declare @vector_step_1_curr varchar(100)
declare @vector_step_2_curr varchar(100)
declare @vector_step_3_curr varchar(100)
declare @vector_step_4_curr varchar(100)
declare @vector_step_5_curr varchar(100)
declare @vector_step_6_curr varchar(100)
declare @vector_step_7_curr varchar(100)
declare @vector_step_8_curr varchar(100)
declare @vector_step_9_curr varchar(100)
declare @vector_step_10_curr varchar(100)
declare @vector_step_11_curr varchar(100)
declare @vector_step_12_curr varchar(100)
declare @vector_step_13_curr varchar(100)
declare @vector_step_14_curr varchar(100)
declare @vector_step_15_curr varchar(100)
declare @vector_step_16_curr varchar(100)
declare @vector_step_17_curr varchar(100)
declare @vector_step_18_curr varchar(100)
declare @vector_step_19_curr varchar(100)
declare @vector_step_20_curr varchar(100)
declare @vector_step_21_curr varchar(100)
declare @vector_step_22_curr varchar(100)
declare @vector_step_23_curr varchar(100)
declare @vector_step_24_curr varchar(100)
declare @vector_step_25_curr varchar(100)
declare @vector_step_26_curr varchar(100)
declare @vector_step_27_curr varchar(100)
declare @vector_step_28_curr varchar(100)
declare @vector_step_29_curr varchar(100)
declare @vector_step_30_curr varchar(100)
declare @vector_step_31_curr varchar(100)
declare @vector_step_32_curr varchar(100)
declare @vector_step_33_curr varchar(100)
declare @vector_step_34_curr varchar(100)
declare @vector_step_35_curr varchar(100)
declare @vector_step_36_curr varchar(100)
declare @vector_step_37_curr varchar(100)
declare @vector_step_38_curr varchar(100)
declare @vector_step_39_curr varchar(100)
declare @vector_step_40_curr varchar(100)
declare @vector_step_41_curr varchar(100)
declare @vector_step_42_curr varchar(100)
declare @vector_step_43_curr varchar(100)
declare @vector_step_44_curr varchar(100)
declare @vector_step_45_curr varchar(100)
declare @vector_step_46_curr varchar(100)
declare @vector_step_47_curr varchar(100)
declare @vector_step_48_curr varchar(100)
declare @vector_step_49_curr varchar(100)
declare @vector_step_50_curr varchar(100)
declare @vector_step_51_curr varchar(100)
declare @vector_step_52_curr varchar(100)
declare @vector_step_53_curr varchar(100)
declare @vector_step_54_curr varchar(100)
declare @vector_step_55_curr varchar(100)
declare @vector_step_56_curr varchar(100)
declare @vector_step_57_curr varchar(100)
declare @vector_step_58_curr varchar(100)
declare @vector_step_59_curr varchar(100)
declare @vector_step_60_curr varchar(100)
declare @vector_step_61_curr varchar(100)
declare @vector_step_62_curr varchar(100)
declare @vector_step_63_curr varchar(100)
declare @vector_step_64_curr varchar(100)
declare @vector_step_65_curr varchar(100)
declare @vector_step_66_curr varchar(100)
declare @vector_step_67_curr varchar(100)
declare @vector_step_68_curr varchar(100)
declare @vector_step_69_curr varchar(100)
declare @vector_step_70_curr varchar(100)
declare @vector_step_71_curr varchar(100)
declare @vector_step_72_curr varchar(100)
declare @vector_step_73_curr varchar(100)
declare @vector_step_74_curr varchar(100)
declare @vector_step_75_curr varchar(100)
declare @vector_step_76_curr varchar(100)
declare @vector_step_77_curr varchar(100)
declare @vector_step_78_curr varchar(100)
declare @vector_step_79_curr varchar(100)
declare @vector_step_80_curr varchar(100)
declare @vector_step_81_curr varchar(100)
declare @vector_step_82_curr varchar(100)
declare @vector_step_83_curr varchar(100)
declare @vector_step_84_curr varchar(100)
declare @vector_step_85_curr varchar(100)
declare @vector_step_86_curr varchar(100)
declare @vector_step_87_curr varchar(100)
declare @vector_step_88_curr varchar(100)
declare @vector_step_89_curr varchar(100)
declare @vector_step_90_curr varchar(100)
declare @vector_step_91_curr varchar(100)
declare @vector_step_92_curr varchar(100)
declare @vector_step_93_curr varchar(100)
declare @vector_step_94_curr varchar(100)
declare @vector_step_95_curr varchar(100)
declare @vector_step_96_curr varchar(100)
declare @vector_step_97_curr varchar(100)
declare @vector_step_98_curr varchar(100)
declare @vector_step_99_curr varchar(100)
declare @vector_step_100_curr varchar(100)

declare @bcid_prev int
declare @bcversion_prev int
declare @vectornumber_prev varchar(3)
declare @vectorname_prev varchar(15)
declare @multimedia_prev varchar(3)
declare @lock_prev varchar(3)
declare @attendant_prev varchar(3)
declare @meet_me_conf_prev varchar(3)
declare @native_name_1_prev varchar(36)
declare @native_name_2_prev varchar(36)
declare @native_name_3_prev varchar(36)
declare @native_name_4_prev varchar(36)
declare @native_name_5_prev varchar(18)
declare @native_name_scripts_prev varchar(8)
declare @vector_step_1_prev varchar(100)
declare @vector_step_2_prev varchar(100)
declare @vector_step_3_prev varchar(100)
declare @vector_step_4_prev varchar(100)
declare @vector_step_5_prev varchar(100)
declare @vector_step_6_prev varchar(100)
declare @vector_step_7_prev varchar(100)
declare @vector_step_8_prev varchar(100)
declare @vector_step_9_prev varchar(100)
declare @vector_step_10_prev varchar(100)
declare @vector_step_11_prev varchar(100)
declare @vector_step_12_prev varchar(100)
declare @vector_step_13_prev varchar(100)
declare @vector_step_14_prev varchar(100)
declare @vector_step_15_prev varchar(100)
declare @vector_step_16_prev varchar(100)
declare @vector_step_17_prev varchar(100)
declare @vector_step_18_prev varchar(100)
declare @vector_step_19_prev varchar(100)
declare @vector_step_20_prev varchar(100)
declare @vector_step_21_prev varchar(100)
declare @vector_step_22_prev varchar(100)
declare @vector_step_23_prev varchar(100)
declare @vector_step_24_prev varchar(100)
declare @vector_step_25_prev varchar(100)
declare @vector_step_26_prev varchar(100)
declare @vector_step_27_prev varchar(100)
declare @vector_step_28_prev varchar(100)
declare @vector_step_29_prev varchar(100)
declare @vector_step_30_prev varchar(100)
declare @vector_step_31_prev varchar(100)
declare @vector_step_32_prev varchar(100)
declare @vector_step_33_prev varchar(100)
declare @vector_step_34_prev varchar(100)
declare @vector_step_35_prev varchar(100)
declare @vector_step_36_prev varchar(100)
declare @vector_step_37_prev varchar(100)
declare @vector_step_38_prev varchar(100)
declare @vector_step_39_prev varchar(100)
declare @vector_step_40_prev varchar(100)
declare @vector_step_41_prev varchar(100)
declare @vector_step_42_prev varchar(100)
declare @vector_step_43_prev varchar(100)
declare @vector_step_44_prev varchar(100)
declare @vector_step_45_prev varchar(100)
declare @vector_step_46_prev varchar(100)
declare @vector_step_47_prev varchar(100)
declare @vector_step_48_prev varchar(100)
declare @vector_step_49_prev varchar(100)
declare @vector_step_50_prev varchar(100)
declare @vector_step_51_prev varchar(100)
declare @vector_step_52_prev varchar(100)
declare @vector_step_53_prev varchar(100)
declare @vector_step_54_prev varchar(100)
declare @vector_step_55_prev varchar(100)
declare @vector_step_56_prev varchar(100)
declare @vector_step_57_prev varchar(100)
declare @vector_step_58_prev varchar(100)
declare @vector_step_59_prev varchar(100)
declare @vector_step_60_prev varchar(100)
declare @vector_step_61_prev varchar(100)
declare @vector_step_62_prev varchar(100)
declare @vector_step_63_prev varchar(100)
declare @vector_step_64_prev varchar(100)
declare @vector_step_65_prev varchar(100)
declare @vector_step_66_prev varchar(100)
declare @vector_step_67_prev varchar(100)
declare @vector_step_68_prev varchar(100)
declare @vector_step_69_prev varchar(100)
declare @vector_step_70_prev varchar(100)
declare @vector_step_71_prev varchar(100)
declare @vector_step_72_prev varchar(100)
declare @vector_step_73_prev varchar(100)
declare @vector_step_74_prev varchar(100)
declare @vector_step_75_prev varchar(100)
declare @vector_step_76_prev varchar(100)
declare @vector_step_77_prev varchar(100)
declare @vector_step_78_prev varchar(100)
declare @vector_step_79_prev varchar(100)
declare @vector_step_80_prev varchar(100)
declare @vector_step_81_prev varchar(100)
declare @vector_step_82_prev varchar(100)
declare @vector_step_83_prev varchar(100)
declare @vector_step_84_prev varchar(100)
declare @vector_step_85_prev varchar(100)
declare @vector_step_86_prev varchar(100)
declare @vector_step_87_prev varchar(100)
declare @vector_step_88_prev varchar(100)
declare @vector_step_89_prev varchar(100)
declare @vector_step_90_prev varchar(100)
declare @vector_step_91_prev varchar(100)
declare @vector_step_92_prev varchar(100)
declare @vector_step_93_prev varchar(100)
declare @vector_step_94_prev varchar(100)
declare @vector_step_95_prev varchar(100)
declare @vector_step_96_prev varchar(100)
declare @vector_step_97_prev varchar(100)
declare @vector_step_98_prev varchar(100)
declare @vector_step_99_prev varchar(100)
declare @vector_step_100_prev varchar(100)

declare @civ_version int
declare @civ_addeddate datetime
declare @civ_updatedby varchar(255)
declare @civ_isdeleted int

declare @readablename varchar(255)

create table #out
(
VectorName varchar(255),
VectorID int,
PropertyName varchar(255),
PreviousValue varchar(255),
CurrentValue varchar(255),
Version int,
AddedDate datetime,
UpdatedBy varchar(255),
IsDeleted int
)

declare c_curr cursor for select
AvayaSDKVector.bcid,
AvayaSDKVector.bcversion,
AvayaSDKVector.vectornumber,
AvayaSDKVector.vectorname,
AvayaSDKVector.multimedia ,
AvayaSDKVector.lock ,
AvayaSDKVector.attendant,
AvayaSDKVector.meet_me_conf ,
AvayaSDKVector.native_name_1,
AvayaSDKVector.native_name_2,
AvayaSDKVector.native_name_3,
AvayaSDKVector.native_name_4,
AvayaSDKVector.native_name_5,
AvayaSDKVector.native_name_scripts,
AvayaSDKVector.vector_step_1,
AvayaSDKVector.vector_step_2,
AvayaSDKVector.vector_step_3,
AvayaSDKVector.vector_step_4,
AvayaSDKVector.vector_step_5,
AvayaSDKVector.vector_step_6,
AvayaSDKVector.vector_step_7,
AvayaSDKVector.vector_step_8,
AvayaSDKVector.vector_step_9,
AvayaSDKVector.vector_step_10,
AvayaSDKVector.vector_step_11,
AvayaSDKVector.vector_step_12,
AvayaSDKVector.vector_step_13,
AvayaSDKVector.vector_step_14,
AvayaSDKVector.vector_step_15,
AvayaSDKVector.vector_step_16,
AvayaSDKVector.vector_step_17,
AvayaSDKVector.vector_step_18,
AvayaSDKVector.vector_step_19,
AvayaSDKVector.vector_step_20,
AvayaSDKVector.vector_step_21,
AvayaSDKVector.vector_step_22,
AvayaSDKVector.vector_step_23,
AvayaSDKVector.vector_step_24,
AvayaSDKVector.vector_step_25,
AvayaSDKVector.vector_step_26,
AvayaSDKVector.vector_step_27,
AvayaSDKVector.vector_step_28,
AvayaSDKVector.vector_step_29,
AvayaSDKVector.vector_step_30,
AvayaSDKVector.vector_step_31,
AvayaSDKVector.vector_step_32,
AvayaSDKVector.vector_step_33,
AvayaSDKVector.vector_step_34,
AvayaSDKVector.vector_step_35,
AvayaSDKVector.vector_step_36,
AvayaSDKVector.vector_step_37,
AvayaSDKVector.vector_step_38,
AvayaSDKVector.vector_step_39,
AvayaSDKVector.vector_step_40,
AvayaSDKVector.vector_step_41,
AvayaSDKVector.vector_step_42,
AvayaSDKVector.vector_step_43,
AvayaSDKVector.vector_step_44,
AvayaSDKVector.vector_step_45,
AvayaSDKVector.vector_step_46,
AvayaSDKVector.vector_step_47,
AvayaSDKVector.vector_step_48,
AvayaSDKVector.vector_step_49,
AvayaSDKVector.vector_step_50,
AvayaSDKVector.vector_step_51,
AvayaSDKVector.vector_step_52,
AvayaSDKVector.vector_step_53,
AvayaSDKVector.vector_step_54,
AvayaSDKVector.vector_step_55,
AvayaSDKVector.vector_step_56,
AvayaSDKVector.vector_step_57,
AvayaSDKVector.vector_step_58,
AvayaSDKVector.vector_step_59,
AvayaSDKVector.vector_step_60,
AvayaSDKVector.vector_step_61,
AvayaSDKVector.vector_step_62,
AvayaSDKVector.vector_step_63,
AvayaSDKVector.vector_step_64,
AvayaSDKVector.vector_step_65,
AvayaSDKVector.vector_step_66,
AvayaSDKVector.vector_step_67,
AvayaSDKVector.vector_step_68,
AvayaSDKVector.vector_step_69,
AvayaSDKVector.vector_step_70,
AvayaSDKVector.vector_step_71,
AvayaSDKVector.vector_step_72,
AvayaSDKVector.vector_step_73,
AvayaSDKVector.vector_step_74,
AvayaSDKVector.vector_step_75,
AvayaSDKVector.vector_step_76,
AvayaSDKVector.vector_step_77,
AvayaSDKVector.vector_step_78,
AvayaSDKVector.vector_step_79,
AvayaSDKVector.vector_step_80,
AvayaSDKVector.vector_step_81,
AvayaSDKVector.vector_step_82,
AvayaSDKVector.vector_step_83,
AvayaSDKVector.vector_step_84,
AvayaSDKVector.vector_step_85,
AvayaSDKVector.vector_step_86,
AvayaSDKVector.vector_step_87,
AvayaSDKVector.vector_step_88,
AvayaSDKVector.vector_step_89,
AvayaSDKVector.vector_step_90,
AvayaSDKVector.vector_step_91,
AvayaSDKVector.vector_step_92,
AvayaSDKVector.vector_step_93,
AvayaSDKVector.vector_step_94,
AvayaSDKVector.vector_step_95,
AvayaSDKVector.vector_step_96,
AvayaSDKVector.vector_step_97,
AvayaSDKVector.vector_step_98,
AvayaSDKVector.vector_step_99,
AvayaSDKVector.vector_step_100,
CIV1.Version,
CIV1.AddedDate,
CIV1.UpdatedBy,
CIV1.IsDeleted
From
(AvayaSDKVector
inner join ConfigurationItemVersion CIV1 on AvayaSDKVector.BCID = CIV1.ID and AvayaSDKVector.BCVersion = CIV1.Version
and CIV1.AddedDate between @in_startdate and @in_enddate)

open c_curr
fetch next from c_curr into
@bcid_curr,
@bcversion_curr,
@vectornumber_curr,
@vectorname_curr,
@multimedia_curr,
@lock_curr,
@attendant_curr,
@meet_me_conf_curr,
@native_name_1_curr,
@native_name_2_curr,
@native_name_3_curr,
@native_name_4_curr,
@native_name_5_curr,
@native_name_scripts_curr,
@vector_step_1_curr,
@vector_step_2_curr,
@vector_step_3_curr,
@vector_step_4_curr,
@vector_step_5_curr,
@vector_step_6_curr,
@vector_step_7_curr,
@vector_step_8_curr,
@vector_step_9_curr,
@vector_step_10_curr,
@vector_step_11_curr,
@vector_step_12_curr,
@vector_step_13_curr,
@vector_step_14_curr,
@vector_step_15_curr,
@vector_step_16_curr,
@vector_step_17_curr,
@vector_step_18_curr,
@vector_step_19_curr,
@vector_step_20_curr,
@vector_step_21_curr,
@vector_step_22_curr,
@vector_step_23_curr,
@vector_step_24_curr,
@vector_step_25_curr,
@vector_step_26_curr,
@vector_step_27_curr,
@vector_step_28_curr,
@vector_step_29_curr,
@vector_step_30_curr,
@vector_step_31_curr,
@vector_step_32_curr,
@vector_step_33_curr,
@vector_step_34_curr,
@vector_step_35_curr,
@vector_step_36_curr,
@vector_step_37_curr,
@vector_step_38_curr,
@vector_step_39_curr,
@vector_step_40_curr,
@vector_step_41_curr,
@vector_step_42_curr,
@vector_step_43_curr,
@vector_step_44_curr,
@vector_step_45_curr,
@vector_step_46_curr,
@vector_step_47_curr,
@vector_step_48_curr,
@vector_step_49_curr,
@vector_step_50_curr,
@vector_step_51_curr,
@vector_step_52_curr,
@vector_step_53_curr,
@vector_step_54_curr,
@vector_step_55_curr,
@vector_step_56_curr,
@vector_step_57_curr,
@vector_step_58_curr,
@vector_step_59_curr,
@vector_step_60_curr,
@vector_step_61_curr,
@vector_step_62_curr,
@vector_step_63_curr,
@vector_step_64_curr,
@vector_step_65_curr,
@vector_step_66_curr,
@vector_step_67_curr,
@vector_step_68_curr,
@vector_step_69_curr,
@vector_step_70_curr,
@vector_step_71_curr,
@vector_step_72_curr,
@vector_step_73_curr,
@vector_step_74_curr,
@vector_step_75_curr,
@vector_step_76_curr,
@vector_step_77_curr,
@vector_step_78_curr,
@vector_step_79_curr,
@vector_step_80_curr,
@vector_step_81_curr,
@vector_step_82_curr,
@vector_step_83_curr,
@vector_step_84_curr,
@vector_step_85_curr,
@vector_step_86_curr,
@vector_step_87_curr,
@vector_step_88_curr,
@vector_step_89_curr,
@vector_step_90_curr,
@vector_step_91_curr,
@vector_step_92_curr,
@vector_step_93_curr,
@vector_step_94_curr,
@vector_step_95_curr,
@vector_step_96_curr,
@vector_step_97_curr,
@vector_step_98_curr,
@vector_step_99_curr,
@vector_step_100_curr,
@civ_version,
@civ_addeddate,
@civ_updatedby,
@civ_isdeleted

while @@fetch_status = 0
begin
declare c_prev cursor for select
AvayaSDKVector.vectornumber,
AvayaSDKVector.vectorname,
AvayaSDKVector.multimedia ,
AvayaSDKVector.lock ,
AvayaSDKVector.attendant,
AvayaSDKVector.meet_me_conf ,
AvayaSDKVector.native_name_1,
AvayaSDKVector.native_name_2,
AvayaSDKVector.native_name_3,
AvayaSDKVector.native_name_4,
AvayaSDKVector.native_name_5,
AvayaSDKVector.native_name_scripts,
AvayaSDKVector.vector_step_1,
AvayaSDKVector.vector_step_2,
AvayaSDKVector.vector_step_3,
AvayaSDKVector.vector_step_4,
AvayaSDKVector.vector_step_5,
AvayaSDKVector.vector_step_6,
AvayaSDKVector.vector_step_7,
AvayaSDKVector.vector_step_8,
AvayaSDKVector.vector_step_9,
AvayaSDKVector.vector_step_10,
AvayaSDKVector.vector_step_11,
AvayaSDKVector.vector_step_12,
AvayaSDKVector.vector_step_13,
AvayaSDKVector.vector_step_14,
AvayaSDKVector.vector_step_15,
AvayaSDKVector.vector_step_16,
AvayaSDKVector.vector_step_17,
AvayaSDKVector.vector_step_18,
AvayaSDKVector.vector_step_19,
AvayaSDKVector.vector_step_20,
AvayaSDKVector.vector_step_21,
AvayaSDKVector.vector_step_22,
AvayaSDKVector.vector_step_23,
AvayaSDKVector.vector_step_24,
AvayaSDKVector.vector_step_25,
AvayaSDKVector.vector_step_26,
AvayaSDKVector.vector_step_27,
AvayaSDKVector.vector_step_28,
AvayaSDKVector.vector_step_29,
AvayaSDKVector.vector_step_30,
AvayaSDKVector.vector_step_31,
AvayaSDKVector.vector_step_32,
AvayaSDKVector.vector_step_33,
AvayaSDKVector.vector_step_34,
AvayaSDKVector.vector_step_35,
AvayaSDKVector.vector_step_36,
AvayaSDKVector.vector_step_37,
AvayaSDKVector.vector_step_38,
AvayaSDKVector.vector_step_39,
AvayaSDKVector.vector_step_40,
AvayaSDKVector.vector_step_41,
AvayaSDKVector.vector_step_42,
AvayaSDKVector.vector_step_43,
AvayaSDKVector.vector_step_44,
AvayaSDKVector.vector_step_45,
AvayaSDKVector.vector_step_46,
AvayaSDKVector.vector_step_47,
AvayaSDKVector.vector_step_48,
AvayaSDKVector.vector_step_49,
AvayaSDKVector.vector_step_50,
AvayaSDKVector.vector_step_51,
AvayaSDKVector.vector_step_52,
AvayaSDKVector.vector_step_53,
AvayaSDKVector.vector_step_54,
AvayaSDKVector.vector_step_55,
AvayaSDKVector.vector_step_56,
AvayaSDKVector.vector_step_57,
AvayaSDKVector.vector_step_58,
AvayaSDKVector.vector_step_59,
AvayaSDKVector.vector_step_60,
AvayaSDKVector.vector_step_61,
AvayaSDKVector.vector_step_62,
AvayaSDKVector.vector_step_63,
AvayaSDKVector.vector_step_64,
AvayaSDKVector.vector_step_65,
AvayaSDKVector.vector_step_66,
AvayaSDKVector.vector_step_67,
AvayaSDKVector.vector_step_68,
AvayaSDKVector.vector_step_69,
AvayaSDKVector.vector_step_70,
AvayaSDKVector.vector_step_71,
AvayaSDKVector.vector_step_72,
AvayaSDKVector.vector_step_73,
AvayaSDKVector.vector_step_74,
AvayaSDKVector.vector_step_75,
AvayaSDKVector.vector_step_76,
AvayaSDKVector.vector_step_77,
AvayaSDKVector.vector_step_78,
AvayaSDKVector.vector_step_79,
AvayaSDKVector.vector_step_80,
AvayaSDKVector.vector_step_81,
AvayaSDKVector.vector_step_82,
AvayaSDKVector.vector_step_83,
AvayaSDKVector.vector_step_84,
AvayaSDKVector.vector_step_85,
AvayaSDKVector.vector_step_86,
AvayaSDKVector.vector_step_87,
AvayaSDKVector.vector_step_88,
AvayaSDKVector.vector_step_89,
AvayaSDKVector.vector_step_90,
AvayaSDKVector.vector_step_91,
AvayaSDKVector.vector_step_92,
AvayaSDKVector.vector_step_93,
AvayaSDKVector.vector_step_94,
AvayaSDKVector.vector_step_95,
AvayaSDKVector.vector_step_96,
AvayaSDKVector.vector_step_97,
AvayaSDKVector.vector_step_98,
AvayaSDKVector.vector_step_99,
AvayaSDKVector.vector_step_100

from AvayaSDKVector where AvayaSDKVector.BCID = @bcid_curr and AvayaSDKVector.BCVersion = @bcversion_curr - 1

open c_prev
fetch next from c_prev into
@bcid_prev,
@bcversion_prev,
@vectornumber_prev,
@vectorname_prev,
@multimedia_prev,
@lock_prev,
@attendant_prev,
@meet_me_conf_prev,
@native_name_1_prev,
@native_name_2_prev,
@native_name_3_prev,
@native_name_4_prev,
@native_name_5_prev,
@native_name_scripts_prev,
@vector_step_1_prev,
@vector_step_2_prev,
@vector_step_3_prev,
@vector_step_4_prev,
@vector_step_5_prev,
@vector_step_6_prev,
@vector_step_7_prev,
@vector_step_8_prev,
@vector_step_9_prev,
@vector_step_10_prev,
@vector_step_11_prev,
@vector_step_12_prev,
@vector_step_13_prev,
@vector_step_14_prev,
@vector_step_15_prev,
@vector_step_16_prev,
@vector_step_17_prev,
@vector_step_18_prev,
@vector_step_19_prev,
@vector_step_20_prev,
@vector_step_21_prev,
@vector_step_22_prev,
@vector_step_23_prev,
@vector_step_24_prev,
@vector_step_25_prev,
@vector_step_26_prev,
@vector_step_27_prev,
@vector_step_28_prev,
@vector_step_29_prev,
@vector_step_30_prev,
@vector_step_31_prev,
@vector_step_32_prev,
@vector_step_33_prev,
@vector_step_34_prev,
@vector_step_35_prev,
@vector_step_36_prev,
@vector_step_37_prev,
@vector_step_38_prev,
@vector_step_39_prev,
@vector_step_40_prev,
@vector_step_41_prev,
@vector_step_42_prev,
@vector_step_43_prev,
@vector_step_44_prev,
@vector_step_45_prev,
@vector_step_46_prev,
@vector_step_47_prev,
@vector_step_48_prev,
@vector_step_49_prev,
@vector_step_50_prev,
@vector_step_51_prev,
@vector_step_52_prev,
@vector_step_53_prev,
@vector_step_54_prev,
@vector_step_55_prev,
@vector_step_56_prev,
@vector_step_57_prev,
@vector_step_58_prev,
@vector_step_59_prev,
@vector_step_60_prev,
@vector_step_61_prev,
@vector_step_62_prev,
@vector_step_63_prev,
@vector_step_64_prev,
@vector_step_65_prev,
@vector_step_66_prev,
@vector_step_67_prev,
@vector_step_68_prev,
@vector_step_69_prev,
@vector_step_70_prev,
@vector_step_71_prev,
@vector_step_72_prev,
@vector_step_73_prev,
@vector_step_74_prev,
@vector_step_75_prev,
@vector_step_76_prev,
@vector_step_77_prev,
@vector_step_78_prev,
@vector_step_79_prev,
@vector_step_80_prev,
@vector_step_81_prev,
@vector_step_82_prev,
@vector_step_83_prev,
@vector_step_84_prev,
@vector_step_85_prev,
@vector_step_86_prev,
@vector_step_87_prev,
@vector_step_88_prev,
@vector_step_89_prev,
@vector_step_90_prev,
@vector_step_91_prev,
@vector_step_92_prev,
@vector_step_93_prev,
@vector_step_94_prev,
@vector_step_95_prev,
@vector_step_96_prev,
@vector_step_97_prev,
@vector_step_98_prev,
@vector_step_99_prev,
@vector_step_100_prev


while @@fetch_status = 0
begin

if (isnull(@vectornumber_curr,0) <> isnull(@vectornumber_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vectornumber'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vectornumber_prev, @vectornumber_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vectorname_curr,0) <> isnull(@vectorname_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vectorname'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vectorname_prev, @vectorname_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@multimedia_curr,0) <> isnull(@multimedia_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'multimedia'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @multimedia_prev, @multimedia_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@lock_curr,0) <> isnull(@lock_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'lock'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @lock_prev, @lock_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@attendant_curr,0) <> isnull(@attendant_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'attendant'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @attendant_prev, @attendant_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@meet_me_conf_curr,0) <> isnull(@meet_me_conf_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'meet_me_conf'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @meet_me_conf_prev, @meet_me_conf_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_1_curr,0) <> isnull(@native_name_1_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_1'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_1_prev, @native_name_1_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_2_curr,0) <> isnull(@native_name_2_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_2'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_2_prev, @native_name_2_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_3_curr,0) <> isnull(@native_name_3_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_3'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_3_prev, @native_name_3_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_4_curr,0) <> isnull(@native_name_4_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_4'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_4_prev, @native_name_4_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_5_curr,0) <> isnull(@native_name_5_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_5'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_5_prev, @native_name_5_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@native_name_scripts_curr,0) <> isnull(@native_name_scripts_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_scripts'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @native_name_scripts_prev, @native_name_scripts_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_1_curr,0) <> isnull(@vector_step_1_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_1'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_1_prev, @vector_step_1_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_2_curr,0) <> isnull(@vector_step_2_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_2'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_2_prev, @vector_step_2_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_3_curr,0) <> isnull(@vector_step_3_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_3'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_3_prev, @vector_step_3_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_4_curr,0) <> isnull(@vector_step_4_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_4'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_4_prev, @vector_step_4_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_5_curr,0) <> isnull(@vector_step_5_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_5'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_5_prev, @vector_step_5_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_6_curr,0) <> isnull(@vector_step_6_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_6'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_6_prev, @vector_step_6_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_7_curr,0) <> isnull(@vector_step_7_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_7'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_7_prev, @vector_step_7_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_8_curr,0) <> isnull(@vector_step_8_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_8'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_8_prev, @vector_step_8_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_9_curr,0) <> isnull(@vector_step_9_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_9'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_9_prev, @vector_step_9_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_10_curr,0) <> isnull(@vector_step_10_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_10'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_10_prev, @vector_step_10_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_11_curr,0) <> isnull(@vector_step_11_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_11'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_11_prev, @vector_step_11_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_12_curr,0) <> isnull(@vector_step_12_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_12'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_12_prev, @vector_step_12_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_13_curr,0) <> isnull(@vector_step_13_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_13'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_13_prev, @vector_step_13_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_14_curr,0) <> isnull(@vector_step_14_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_14'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_14_prev, @vector_step_14_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_15_curr,0) <> isnull(@vector_step_15_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_15'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_15_prev, @vector_step_15_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_16_curr,0) <> isnull(@vector_step_16_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_16'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_16_prev, @vector_step_16_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_17_curr,0) <> isnull(@vector_step_17_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_17'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_17_prev, @vector_step_17_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_18_curr,0) <> isnull(@vector_step_18_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_18'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_18_prev, @vector_step_18_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_19_curr,0) <> isnull(@vector_step_19_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_19'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_19_prev, @vector_step_19_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_20_curr,0) <> isnull(@vector_step_20_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_20'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_20_prev, @vector_step_20_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_21_curr,0) <> isnull(@vector_step_21_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_21'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_21_prev, @vector_step_21_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_22_curr,0) <> isnull(@vector_step_22_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_22'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_22_prev, @vector_step_22_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_23_curr,0) <> isnull(@vector_step_23_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_23'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_23_prev, @vector_step_23_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_24_curr,0) <> isnull(@vector_step_24_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_24'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_24_prev, @vector_step_24_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_25_curr,0) <> isnull(@vector_step_25_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_25'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_25_prev, @vector_step_25_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_26_curr,0) <> isnull(@vector_step_26_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_26'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_26_prev, @vector_step_26_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_27_curr,0) <> isnull(@vector_step_27_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_27'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_27_prev, @vector_step_27_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_28_curr,0) <> isnull(@vector_step_28_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_28'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_28_prev, @vector_step_28_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_29_curr,0) <> isnull(@vector_step_29_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_29'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_29_prev, @vector_step_29_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_30_curr,0) <> isnull(@vector_step_30_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_30'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_30_prev, @vector_step_30_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_31_curr,0) <> isnull(@vector_step_31_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_31'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_31_prev, @vector_step_31_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_32_curr,0) <> isnull(@vector_step_32_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_32'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_32_prev, @vector_step_32_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_33_curr,0) <> isnull(@vector_step_33_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_33'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_33_prev, @vector_step_33_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_34_curr,0) <> isnull(@vector_step_34_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_34'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_34_prev, @vector_step_34_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_35_curr,0) <> isnull(@vector_step_35_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_35'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_35_prev, @vector_step_35_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_36_curr,0) <> isnull(@vector_step_36_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_36'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_36_prev, @vector_step_36_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_37_curr,0) <> isnull(@vector_step_37_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_37'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_37_prev, @vector_step_37_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_38_curr,0) <> isnull(@vector_step_38_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_38'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_38_prev, @vector_step_38_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_39_curr,0) <> isnull(@vector_step_39_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_39'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_39_prev, @vector_step_39_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_40_curr,0) <> isnull(@vector_step_40_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_40'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_40_prev, @vector_step_40_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_41_curr,0) <> isnull(@vector_step_41_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_41'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_41_prev, @vector_step_41_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_42_curr,0) <> isnull(@vector_step_42_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_42'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_42_prev, @vector_step_42_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_43_curr,0) <> isnull(@vector_step_43_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_43'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_43_prev, @vector_step_43_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_44_curr,0) <> isnull(@vector_step_44_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_44'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_44_prev, @vector_step_44_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_45_curr,0) <> isnull(@vector_step_45_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_45'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_45_prev, @vector_step_45_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_46_curr,0) <> isnull(@vector_step_46_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_46'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_46_prev, @vector_step_46_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_47_curr,0) <> isnull(@vector_step_47_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_47'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_47_prev, @vector_step_47_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_48_curr,0) <> isnull(@vector_step_48_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_48'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_48_prev, @vector_step_48_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_49_curr,0) <> isnull(@vector_step_49_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_49'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_49_prev, @vector_step_49_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_50_curr,0) <> isnull(@vector_step_50_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_50'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_50_prev, @vector_step_50_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_51_curr,0) <> isnull(@vector_step_51_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_51'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_51_prev, @vector_step_51_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_52_curr,0) <> isnull(@vector_step_52_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_52'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_52_prev, @vector_step_52_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_53_curr,0) <> isnull(@vector_step_53_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_53'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_53_prev, @vector_step_53_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_54_curr,0) <> isnull(@vector_step_54_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_54'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_54_prev, @vector_step_54_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_55_curr,0) <> isnull(@vector_step_55_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_55'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_55_prev, @vector_step_55_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_56_curr,0) <> isnull(@vector_step_56_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_56'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_56_prev, @vector_step_56_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_57_curr,0) <> isnull(@vector_step_57_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_57'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_57_prev, @vector_step_57_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_58_curr,0) <> isnull(@vector_step_58_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_58'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_58_prev, @vector_step_58_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_59_curr,0) <> isnull(@vector_step_59_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_59'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_59_prev, @vector_step_59_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_60_curr,0) <> isnull(@vector_step_60_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_60'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_60_prev, @vector_step_60_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_61_curr,0) <> isnull(@vector_step_61_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_61'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_61_prev, @vector_step_61_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_62_curr,0) <> isnull(@vector_step_62_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_62'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_62_prev, @vector_step_62_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_63_curr,0) <> isnull(@vector_step_63_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_63'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_63_prev, @vector_step_63_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_64_curr,0) <> isnull(@vector_step_64_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_64'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_64_prev, @vector_step_64_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_65_curr,0) <> isnull(@vector_step_65_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_65'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_65_prev, @vector_step_65_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_66_curr,0) <> isnull(@vector_step_66_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_66'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_66_prev, @vector_step_66_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_67_curr,0) <> isnull(@vector_step_67_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_67'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_67_prev, @vector_step_67_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_68_curr,0) <> isnull(@vector_step_68_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_68'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_68_prev, @vector_step_68_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_69_curr,0) <> isnull(@vector_step_69_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_69'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_69_prev, @vector_step_69_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_70_curr,0) <> isnull(@vector_step_70_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_70'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_70_prev, @vector_step_70_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_71_curr,0) <> isnull(@vector_step_71_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_71'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_71_prev, @vector_step_71_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_72_curr,0) <> isnull(@vector_step_72_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_72'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_72_prev, @vector_step_72_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_73_curr,0) <> isnull(@vector_step_73_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_73'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_73_prev, @vector_step_73_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_74_curr,0) <> isnull(@vector_step_74_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_74'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_74_prev, @vector_step_74_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_75_curr,0) <> isnull(@vector_step_75_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_75'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_75_prev, @vector_step_75_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_76_curr,0) <> isnull(@vector_step_76_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_76'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_76_prev, @vector_step_76_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_77_curr,0) <> isnull(@vector_step_77_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_77'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_77_prev, @vector_step_77_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_78_curr,0) <> isnull(@vector_step_78_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_78'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_78_prev, @vector_step_78_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_79_curr,0) <> isnull(@vector_step_79_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_79'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_79_prev, @vector_step_79_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_80_curr,0) <> isnull(@vector_step_80_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_80'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_80_prev, @vector_step_80_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_81_curr,0) <> isnull(@vector_step_81_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_81'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_81_prev, @vector_step_81_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_82_curr,0) <> isnull(@vector_step_82_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_82'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_82_prev, @vector_step_82_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_83_curr,0) <> isnull(@vector_step_83_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_83'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_83_prev, @vector_step_83_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_84_curr,0) <> isnull(@vector_step_84_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_84'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_84_prev, @vector_step_84_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_85_curr,0) <> isnull(@vector_step_85_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_85'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_85_prev, @vector_step_85_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_86_curr,0) <> isnull(@vector_step_86_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_86'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_86_prev, @vector_step_86_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_87_curr,0) <> isnull(@vector_step_87_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_87'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_87_prev, @vector_step_87_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_88_curr,0) <> isnull(@vector_step_88_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_88'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_88_prev, @vector_step_88_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_89_curr,0) <> isnull(@vector_step_89_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_89'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_89_prev, @vector_step_89_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_90_curr,0) <> isnull(@vector_step_90_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_90'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_90_prev, @vector_step_90_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_91_curr,0) <> isnull(@vector_step_91_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_91'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_91_prev, @vector_step_91_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_92_curr,0) <> isnull(@vector_step_92_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_92'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_92_prev, @vector_step_92_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_93_curr,0) <> isnull(@vector_step_93_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_93'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_93_prev, @vector_step_93_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_94_curr,0) <> isnull(@vector_step_94_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_94'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_94_prev, @vector_step_94_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_95_curr,0) <> isnull(@vector_step_95_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_95'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_95_prev, @vector_step_95_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_96_curr,0) <> isnull(@vector_step_96_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_96'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_96_prev, @vector_step_96_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_97_curr,0) <> isnull(@vector_step_97_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_97'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_97_prev, @vector_step_97_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_98_curr,0) <> isnull(@vector_step_98_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_98'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_98_prev, @vector_step_98_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_99_curr,0) <> isnull(@vector_step_99_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_99'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_99_prev, @vector_step_99_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

if (isnull(@vector_step_100_curr,0) <> isnull(@vector_step_100_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_100'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted) values (@vectornumber_curr, @readablename, @vector_step_100_prev, @vector_step_100_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted)
end

fetch next from c_prev into
@bcid_prev,
@bcversion_prev,
@vectornumber_prev,
@vectorname_prev,
@multimedia_prev,
@lock_prev,
@attendant_prev,
@meet_me_conf_prev,
@native_name_1_prev,
@native_name_2_prev,
@native_name_3_prev,
@native_name_4_prev,
@native_name_5_prev,
@native_name_scripts_prev,
@vector_step_1_prev,
@vector_step_2_prev,
@vector_step_3_prev,
@vector_step_4_prev,
@vector_step_5_prev,
@vector_step_6_prev,
@vector_step_7_prev,
@vector_step_8_prev,
@vector_step_9_prev,
@vector_step_10_prev,
@vector_step_11_prev,
@vector_step_12_prev,
@vector_step_13_prev,
@vector_step_14_prev,
@vector_step_15_prev,
@vector_step_16_prev,
@vector_step_17_prev,
@vector_step_18_prev,
@vector_step_19_prev,
@vector_step_20_prev,
@vector_step_21_prev,
@vector_step_22_prev,
@vector_step_23_prev,
@vector_step_24_prev,
@vector_step_25_prev,
@vector_step_26_prev,
@vector_step_27_prev,
@vector_step_28_prev,
@vector_step_29_prev,
@vector_step_30_prev,
@vector_step_31_prev,
@vector_step_32_prev,
@vector_step_33_prev,
@vector_step_34_prev,
@vector_step_35_prev,
@vector_step_36_prev,
@vector_step_37_prev,
@vector_step_38_prev,
@vector_step_39_prev,
@vector_step_40_prev,
@vector_step_41_prev,
@vector_step_42_prev,
@vector_step_43_prev,
@vector_step_44_prev,
@vector_step_45_prev,
@vector_step_46_prev,
@vector_step_47_prev,
@vector_step_48_prev,
@vector_step_49_prev,
@vector_step_50_prev,
@vector_step_51_prev,
@vector_step_52_prev,
@vector_step_53_prev,
@vector_step_54_prev,
@vector_step_55_prev,
@vector_step_56_prev,
@vector_step_57_prev,
@vector_step_58_prev,
@vector_step_59_prev,
@vector_step_60_prev,
@vector_step_61_prev,
@vector_step_62_prev,
@vector_step_63_prev,
@vector_step_64_prev,
@vector_step_65_prev,
@vector_step_66_prev,
@vector_step_67_prev,
@vector_step_68_prev,
@vector_step_69_prev,
@vector_step_70_prev,
@vector_step_71_prev,
@vector_step_72_prev,
@vector_step_73_prev,
@vector_step_74_prev,
@vector_step_75_prev,
@vector_step_76_prev,
@vector_step_77_prev,
@vector_step_78_prev,
@vector_step_79_prev,
@vector_step_80_prev,
@vector_step_81_prev,
@vector_step_82_prev,
@vector_step_83_prev,
@vector_step_84_prev,
@vector_step_85_prev,
@vector_step_86_prev,
@vector_step_87_prev,
@vector_step_88_prev,
@vector_step_89_prev,
@vector_step_90_prev,
@vector_step_91_prev,
@vector_step_92_prev,
@vector_step_93_prev,
@vector_step_94_prev,
@vector_step_95_prev,
@vector_step_96_prev,
@vector_step_97_prev,
@vector_step_98_prev,
@vector_step_99_prev,
@vector_step_100_prev
end
close c_prev
deallocate c_prev

fetch next from c_curr into
@bcid_curr,
@bcversion_curr,
@vectornumber_curr,
@vectorname_curr,
@multimedia_curr,
@lock_curr,
@attendant_curr,
@meet_me_conf_curr,
@native_name_1_curr,
@native_name_2_curr,
@native_name_3_curr,
@native_name_4_curr,
@native_name_5_curr,
@native_name_scripts_curr,
@vector_step_1_curr,
@vector_step_2_curr,
@vector_step_3_curr,
@vector_step_4_curr,
@vector_step_5_curr,
@vector_step_6_curr,
@vector_step_7_curr,
@vector_step_8_curr,
@vector_step_9_curr,
@vector_step_10_curr,
@vector_step_11_curr,
@vector_step_12_curr,
@vector_step_13_curr,
@vector_step_14_curr,
@vector_step_15_curr,
@vector_step_16_curr,
@vector_step_17_curr,
@vector_step_18_curr,
@vector_step_19_curr,
@vector_step_20_curr,
@vector_step_21_curr,
@vector_step_22_curr,
@vector_step_23_curr,
@vector_step_24_curr,
@vector_step_25_curr,
@vector_step_26_curr,
@vector_step_27_curr,
@vector_step_28_curr,
@vector_step_29_curr,
@vector_step_30_curr,
@vector_step_31_curr,
@vector_step_32_curr,
@vector_step_33_curr,
@vector_step_34_curr,
@vector_step_35_curr,
@vector_step_36_curr,
@vector_step_37_curr,
@vector_step_38_curr,
@vector_step_39_curr,
@vector_step_40_curr,
@vector_step_41_curr,
@vector_step_42_curr,
@vector_step_43_curr,
@vector_step_44_curr,
@vector_step_45_curr,
@vector_step_46_curr,
@vector_step_47_curr,
@vector_step_48_curr,
@vector_step_49_curr,
@vector_step_50_curr,
@vector_step_51_curr,
@vector_step_52_curr,
@vector_step_53_curr,
@vector_step_54_curr,
@vector_step_55_curr,
@vector_step_56_curr,
@vector_step_57_curr,
@vector_step_58_curr,
@vector_step_59_curr,
@vector_step_60_curr,
@vector_step_61_curr,
@vector_step_62_curr,
@vector_step_63_curr,
@vector_step_64_curr,
@vector_step_65_curr,
@vector_step_66_curr,
@vector_step_67_curr,
@vector_step_68_curr,
@vector_step_69_curr,
@vector_step_70_curr,
@vector_step_71_curr,
@vector_step_72_curr,
@vector_step_73_curr,
@vector_step_74_curr,
@vector_step_75_curr,
@vector_step_76_curr,
@vector_step_77_curr,
@vector_step_78_curr,
@vector_step_79_curr,
@vector_step_80_curr,
@vector_step_81_curr,
@vector_step_82_curr,
@vector_step_83_curr,
@vector_step_84_curr,
@vector_step_85_curr,
@vector_step_86_curr,
@vector_step_87_curr,
@vector_step_88_curr,
@vector_step_89_curr,
@vector_step_90_curr,
@vector_step_91_curr,
@vector_step_92_curr,
@vector_step_93_curr,
@vector_step_94_curr,
@vector_step_95_curr,
@vector_step_96_curr,
@vector_step_97_curr,
@vector_step_98_curr,
@vector_step_99_curr,
@vector_step_100_curr,
@civ_version,
@civ_addeddate,
@civ_updatedby,
@civ_isdeleted
end
close c_curr
deallocate c_curr

select * from #out order by AddedDate asc

drop table #out

end


visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/01/2013 :  05:30:58  Show Profile  Reply with Quote
you're missing last five columns in fetch next part

ie corresponding variables for below
@civ_version,
@civ_addeddate,
@civ_updatedby,
@civ_isdeleted

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sprotson
Yak Posting Veteran

70 Posts

Posted - 03/01/2013 :  05:40:03  Show Profile  Reply with Quote
Thanks for the quick reply, I had actually just worked that one out, but appreciate your help.
Go to Top of Page

sprotson
Yak Posting Veteran

70 Posts

Posted - 03/04/2013 :  06:00:16  Show Profile  Reply with Quote
The stored procedure as it stands checks to see if there are any differences between the current version and the previous version. This works great, but it means when the item is on version 1 it does not return any values (obviously because there is no previous version).

I need to be able to amend the stored procedure to return all columns when it is version 1, and then when on subsequent versions, only the columns that have changed.

I have been told by a colleague - So after that inner while loop you could just add an if current ver is 1 then ... And then make a copy of all the insert records above.

To be honest, I am not sure what/where the inner loop is and what is meant by the insert statements. Sorry if that is really stupid, but I am amending an existing stored procedure and although it works, I dont really understand what it is doinf exactly.

Can anyone offer any advice as to what I need to change or add in to this stored procedure?

Below is the sproc as it stands

USE [SpotlightAACC]
GO
/****** Object: StoredProcedure [dbo].[sp_AvayaSDKVectorChange] Script Date: 03/01/2013 09:50:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[sp_AvayaSDKVectorChange]
@in_startdate datetime,
@in_enddate datetime
as
begin
declare @bcid_curr int
declare @bcversion_curr int
declare @vectornumber_curr varchar(3)
declare @vectorname_curr varchar(15)
declare @multimedia_curr varchar(3)
declare @lock_curr varchar(3)
declare @attendant_curr varchar(3)
declare @meet_me_conf_curr varchar(3)
declare @native_name_1_curr varchar(36)
declare @native_name_2_curr varchar(36)
declare @native_name_3_curr varchar(36)
declare @native_name_4_curr varchar(36)
declare @native_name_5_curr varchar(18)
declare @native_name_scripts_curr varchar(8)
declare @vector_step_1_curr varchar(100)
declare @vector_step_2_curr varchar(100)
declare @vector_step_3_curr varchar(100)
declare @vector_step_4_curr varchar(100)
declare @vector_step_5_curr varchar(100)
declare @vector_step_6_curr varchar(100)
declare @vector_step_7_curr varchar(100)
declare @vector_step_8_curr varchar(100)
declare @vector_step_9_curr varchar(100)
declare @vector_step_10_curr varchar(100)
declare @vector_step_11_curr varchar(100)
declare @vector_step_12_curr varchar(100)
declare @vector_step_13_curr varchar(100)
declare @vector_step_14_curr varchar(100)
declare @vector_step_15_curr varchar(100)
declare @vector_step_16_curr varchar(100)
declare @vector_step_17_curr varchar(100)
declare @vector_step_18_curr varchar(100)
declare @vector_step_19_curr varchar(100)
declare @vector_step_20_curr varchar(100)
declare @vector_step_21_curr varchar(100)
declare @vector_step_22_curr varchar(100)
declare @vector_step_23_curr varchar(100)
declare @vector_step_24_curr varchar(100)
declare @vector_step_25_curr varchar(100)
declare @vector_step_26_curr varchar(100)
declare @vector_step_27_curr varchar(100)
declare @vector_step_28_curr varchar(100)
declare @vector_step_29_curr varchar(100)
declare @vector_step_30_curr varchar(100)
declare @vector_step_31_curr varchar(100)
declare @vector_step_32_curr varchar(100)
declare @vector_step_33_curr varchar(100)
declare @vector_step_34_curr varchar(100)
declare @vector_step_35_curr varchar(100)
declare @vector_step_36_curr varchar(100)
declare @vector_step_37_curr varchar(100)
declare @vector_step_38_curr varchar(100)
declare @vector_step_39_curr varchar(100)
declare @vector_step_40_curr varchar(100)
declare @vector_step_41_curr varchar(100)
declare @vector_step_42_curr varchar(100)
declare @vector_step_43_curr varchar(100)
declare @vector_step_44_curr varchar(100)
declare @vector_step_45_curr varchar(100)
declare @vector_step_46_curr varchar(100)
declare @vector_step_47_curr varchar(100)
declare @vector_step_48_curr varchar(100)
declare @vector_step_49_curr varchar(100)
declare @vector_step_50_curr varchar(100)
declare @vector_step_51_curr varchar(100)
declare @vector_step_52_curr varchar(100)
declare @vector_step_53_curr varchar(100)
declare @vector_step_54_curr varchar(100)
declare @vector_step_55_curr varchar(100)
declare @vector_step_56_curr varchar(100)
declare @vector_step_57_curr varchar(100)
declare @vector_step_58_curr varchar(100)
declare @vector_step_59_curr varchar(100)
declare @vector_step_60_curr varchar(100)
declare @vector_step_61_curr varchar(100)
declare @vector_step_62_curr varchar(100)
declare @vector_step_63_curr varchar(100)
declare @vector_step_64_curr varchar(100)
declare @vector_step_65_curr varchar(100)
declare @vector_step_66_curr varchar(100)
declare @vector_step_67_curr varchar(100)
declare @vector_step_68_curr varchar(100)
declare @vector_step_69_curr varchar(100)
declare @vector_step_70_curr varchar(100)
declare @vector_step_71_curr varchar(100)
declare @vector_step_72_curr varchar(100)
declare @vector_step_73_curr varchar(100)
declare @vector_step_74_curr varchar(100)
declare @vector_step_75_curr varchar(100)
declare @vector_step_76_curr varchar(100)
declare @vector_step_77_curr varchar(100)
declare @vector_step_78_curr varchar(100)
declare @vector_step_79_curr varchar(100)
declare @vector_step_80_curr varchar(100)
declare @vector_step_81_curr varchar(100)
declare @vector_step_82_curr varchar(100)
declare @vector_step_83_curr varchar(100)
declare @vector_step_84_curr varchar(100)
declare @vector_step_85_curr varchar(100)
declare @vector_step_86_curr varchar(100)
declare @vector_step_87_curr varchar(100)
declare @vector_step_88_curr varchar(100)
declare @vector_step_89_curr varchar(100)
declare @vector_step_90_curr varchar(100)
declare @vector_step_91_curr varchar(100)
declare @vector_step_92_curr varchar(100)
declare @vector_step_93_curr varchar(100)
declare @vector_step_94_curr varchar(100)
declare @vector_step_95_curr varchar(100)
declare @vector_step_96_curr varchar(100)
declare @vector_step_97_curr varchar(100)
declare @vector_step_98_curr varchar(100)
declare @vector_step_99_curr varchar(100)
declare @vector_step_100_curr varchar(100)

declare @bcid_prev int
declare @bcversion_prev int
declare @vectornumber_prev varchar(3)
declare @vectorname_prev varchar(15)
declare @multimedia_prev varchar(3)
declare @lock_prev varchar(3)
declare @attendant_prev varchar(3)
declare @meet_me_conf_prev varchar(3)
declare @native_name_1_prev varchar(36)
declare @native_name_2_prev varchar(36)
declare @native_name_3_prev varchar(36)
declare @native_name_4_prev varchar(36)
declare @native_name_5_prev varchar(18)
declare @native_name_scripts_prev varchar(8)
declare @vector_step_1_prev varchar(100)
declare @vector_step_2_prev varchar(100)
declare @vector_step_3_prev varchar(100)
declare @vector_step_4_prev varchar(100)
declare @vector_step_5_prev varchar(100)
declare @vector_step_6_prev varchar(100)
declare @vector_step_7_prev varchar(100)
declare @vector_step_8_prev varchar(100)
declare @vector_step_9_prev varchar(100)
declare @vector_step_10_prev varchar(100)
declare @vector_step_11_prev varchar(100)
declare @vector_step_12_prev varchar(100)
declare @vector_step_13_prev varchar(100)
declare @vector_step_14_prev varchar(100)
declare @vector_step_15_prev varchar(100)
declare @vector_step_16_prev varchar(100)
declare @vector_step_17_prev varchar(100)
declare @vector_step_18_prev varchar(100)
declare @vector_step_19_prev varchar(100)
declare @vector_step_20_prev varchar(100)
declare @vector_step_21_prev varchar(100)
declare @vector_step_22_prev varchar(100)
declare @vector_step_23_prev varchar(100)
declare @vector_step_24_prev varchar(100)
declare @vector_step_25_prev varchar(100)
declare @vector_step_26_prev varchar(100)
declare @vector_step_27_prev varchar(100)
declare @vector_step_28_prev varchar(100)
declare @vector_step_29_prev varchar(100)
declare @vector_step_30_prev varchar(100)
declare @vector_step_31_prev varchar(100)
declare @vector_step_32_prev varchar(100)
declare @vector_step_33_prev varchar(100)
declare @vector_step_34_prev varchar(100)
declare @vector_step_35_prev varchar(100)
declare @vector_step_36_prev varchar(100)
declare @vector_step_37_prev varchar(100)
declare @vector_step_38_prev varchar(100)
declare @vector_step_39_prev varchar(100)
declare @vector_step_40_prev varchar(100)
declare @vector_step_41_prev varchar(100)
declare @vector_step_42_prev varchar(100)
declare @vector_step_43_prev varchar(100)
declare @vector_step_44_prev varchar(100)
declare @vector_step_45_prev varchar(100)
declare @vector_step_46_prev varchar(100)
declare @vector_step_47_prev varchar(100)
declare @vector_step_48_prev varchar(100)
declare @vector_step_49_prev varchar(100)
declare @vector_step_50_prev varchar(100)
declare @vector_step_51_prev varchar(100)
declare @vector_step_52_prev varchar(100)
declare @vector_step_53_prev varchar(100)
declare @vector_step_54_prev varchar(100)
declare @vector_step_55_prev varchar(100)
declare @vector_step_56_prev varchar(100)
declare @vector_step_57_prev varchar(100)
declare @vector_step_58_prev varchar(100)
declare @vector_step_59_prev varchar(100)
declare @vector_step_60_prev varchar(100)
declare @vector_step_61_prev varchar(100)
declare @vector_step_62_prev varchar(100)
declare @vector_step_63_prev varchar(100)
declare @vector_step_64_prev varchar(100)
declare @vector_step_65_prev varchar(100)
declare @vector_step_66_prev varchar(100)
declare @vector_step_67_prev varchar(100)
declare @vector_step_68_prev varchar(100)
declare @vector_step_69_prev varchar(100)
declare @vector_step_70_prev varchar(100)
declare @vector_step_71_prev varchar(100)
declare @vector_step_72_prev varchar(100)
declare @vector_step_73_prev varchar(100)
declare @vector_step_74_prev varchar(100)
declare @vector_step_75_prev varchar(100)
declare @vector_step_76_prev varchar(100)
declare @vector_step_77_prev varchar(100)
declare @vector_step_78_prev varchar(100)
declare @vector_step_79_prev varchar(100)
declare @vector_step_80_prev varchar(100)
declare @vector_step_81_prev varchar(100)
declare @vector_step_82_prev varchar(100)
declare @vector_step_83_prev varchar(100)
declare @vector_step_84_prev varchar(100)
declare @vector_step_85_prev varchar(100)
declare @vector_step_86_prev varchar(100)
declare @vector_step_87_prev varchar(100)
declare @vector_step_88_prev varchar(100)
declare @vector_step_89_prev varchar(100)
declare @vector_step_90_prev varchar(100)
declare @vector_step_91_prev varchar(100)
declare @vector_step_92_prev varchar(100)
declare @vector_step_93_prev varchar(100)
declare @vector_step_94_prev varchar(100)
declare @vector_step_95_prev varchar(100)
declare @vector_step_96_prev varchar(100)
declare @vector_step_97_prev varchar(100)
declare @vector_step_98_prev varchar(100)
declare @vector_step_99_prev varchar(100)
declare @vector_step_100_prev varchar(100)

declare @civ_version int
declare @civ_addeddate datetime
declare @civ_updatedby varchar(255)
declare @civ_isdeleted int

declare @readablename varchar(255)

create table #out
(
VectorNumber int,VectorName varchar(255),
VectorID int,
PropertyName varchar(255),
PreviousValue varchar(255),
CurrentValue varchar(255),
Version int,
AddedDate datetime,
UpdatedBy varchar(255),
IsDeleted int, BCID int
)

declare c_curr cursor for select
AvayaSDKVector.bcid,
AvayaSDKVector.bcversion,
AvayaSDKVector.vectornumber,
AvayaSDKVector.vectorname,
AvayaSDKVector.multimedia ,
AvayaSDKVector.lock ,
AvayaSDKVector.attendant,
AvayaSDKVector.meet_me_conf ,
AvayaSDKVector.native_name_1,
AvayaSDKVector.native_name_2,
AvayaSDKVector.native_name_3,
AvayaSDKVector.native_name_4,
AvayaSDKVector.native_name_5,
AvayaSDKVector.native_name_scripts,
AvayaSDKVector.vector_step_1,
AvayaSDKVector.vector_step_2,
AvayaSDKVector.vector_step_3,
AvayaSDKVector.vector_step_4,
AvayaSDKVector.vector_step_5,
AvayaSDKVector.vector_step_6,
AvayaSDKVector.vector_step_7,
AvayaSDKVector.vector_step_8,
AvayaSDKVector.vector_step_9,
AvayaSDKVector.vector_step_10,
AvayaSDKVector.vector_step_11,
AvayaSDKVector.vector_step_12,
AvayaSDKVector.vector_step_13,
AvayaSDKVector.vector_step_14,
AvayaSDKVector.vector_step_15,
AvayaSDKVector.vector_step_16,
AvayaSDKVector.vector_step_17,
AvayaSDKVector.vector_step_18,
AvayaSDKVector.vector_step_19,
AvayaSDKVector.vector_step_20,
AvayaSDKVector.vector_step_21,
AvayaSDKVector.vector_step_22,
AvayaSDKVector.vector_step_23,
AvayaSDKVector.vector_step_24,
AvayaSDKVector.vector_step_25,
AvayaSDKVector.vector_step_26,
AvayaSDKVector.vector_step_27,
AvayaSDKVector.vector_step_28,
AvayaSDKVector.vector_step_29,
AvayaSDKVector.vector_step_30,
AvayaSDKVector.vector_step_31,
AvayaSDKVector.vector_step_32,
AvayaSDKVector.vector_step_33,
AvayaSDKVector.vector_step_34,
AvayaSDKVector.vector_step_35,
AvayaSDKVector.vector_step_36,
AvayaSDKVector.vector_step_37,
AvayaSDKVector.vector_step_38,
AvayaSDKVector.vector_step_39,
AvayaSDKVector.vector_step_40,
AvayaSDKVector.vector_step_41,
AvayaSDKVector.vector_step_42,
AvayaSDKVector.vector_step_43,
AvayaSDKVector.vector_step_44,
AvayaSDKVector.vector_step_45,
AvayaSDKVector.vector_step_46,
AvayaSDKVector.vector_step_47,
AvayaSDKVector.vector_step_48,
AvayaSDKVector.vector_step_49,
AvayaSDKVector.vector_step_50,
AvayaSDKVector.vector_step_51,
AvayaSDKVector.vector_step_52,
AvayaSDKVector.vector_step_53,
AvayaSDKVector.vector_step_54,
AvayaSDKVector.vector_step_55,
AvayaSDKVector.vector_step_56,
AvayaSDKVector.vector_step_57,
AvayaSDKVector.vector_step_58,
AvayaSDKVector.vector_step_59,
AvayaSDKVector.vector_step_60,
AvayaSDKVector.vector_step_61,
AvayaSDKVector.vector_step_62,
AvayaSDKVector.vector_step_63,
AvayaSDKVector.vector_step_64,
AvayaSDKVector.vector_step_65,
AvayaSDKVector.vector_step_66,
AvayaSDKVector.vector_step_67,
AvayaSDKVector.vector_step_68,
AvayaSDKVector.vector_step_69,
AvayaSDKVector.vector_step_70,
AvayaSDKVector.vector_step_71,
AvayaSDKVector.vector_step_72,
AvayaSDKVector.vector_step_73,
AvayaSDKVector.vector_step_74,
AvayaSDKVector.vector_step_75,
AvayaSDKVector.vector_step_76,
AvayaSDKVector.vector_step_77,
AvayaSDKVector.vector_step_78,
AvayaSDKVector.vector_step_79,
AvayaSDKVector.vector_step_80,
AvayaSDKVector.vector_step_81,
AvayaSDKVector.vector_step_82,
AvayaSDKVector.vector_step_83,
AvayaSDKVector.vector_step_84,
AvayaSDKVector.vector_step_85,
AvayaSDKVector.vector_step_86,
AvayaSDKVector.vector_step_87,
AvayaSDKVector.vector_step_88,
AvayaSDKVector.vector_step_89,
AvayaSDKVector.vector_step_90,
AvayaSDKVector.vector_step_91,
AvayaSDKVector.vector_step_92,
AvayaSDKVector.vector_step_93,
AvayaSDKVector.vector_step_94,
AvayaSDKVector.vector_step_95,
AvayaSDKVector.vector_step_96,
AvayaSDKVector.vector_step_97,
AvayaSDKVector.vector_step_98,
AvayaSDKVector.vector_step_99,
AvayaSDKVector.vector_step_100,
CIV1.Version,
CIV1.AddedDate,
CIV1.UpdatedBy,
CIV1.IsDeleted
From
(AvayaSDKVector
inner join ConfigurationItemVersion CIV1 on AvayaSDKVector.BCID = CIV1.ID and AvayaSDKVector.BCVersion = CIV1.Version
and CIV1.AddedDate between @in_startdate and @in_enddate)

open c_curr
fetch next from c_curr into
@bcid_curr,
@bcversion_curr,
@vectornumber_curr,
@vectorname_curr,
@multimedia_curr,
@lock_curr,
@attendant_curr,
@meet_me_conf_curr,
@native_name_1_curr,
@native_name_2_curr,
@native_name_3_curr,
@native_name_4_curr,
@native_name_5_curr,
@native_name_scripts_curr,
@vector_step_1_curr,
@vector_step_2_curr,
@vector_step_3_curr,
@vector_step_4_curr,
@vector_step_5_curr,
@vector_step_6_curr,
@vector_step_7_curr,
@vector_step_8_curr,
@vector_step_9_curr,
@vector_step_10_curr,
@vector_step_11_curr,
@vector_step_12_curr,
@vector_step_13_curr,
@vector_step_14_curr,
@vector_step_15_curr,
@vector_step_16_curr,
@vector_step_17_curr,
@vector_step_18_curr,
@vector_step_19_curr,
@vector_step_20_curr,
@vector_step_21_curr,
@vector_step_22_curr,
@vector_step_23_curr,
@vector_step_24_curr,
@vector_step_25_curr,
@vector_step_26_curr,
@vector_step_27_curr,
@vector_step_28_curr,
@vector_step_29_curr,
@vector_step_30_curr,
@vector_step_31_curr,
@vector_step_32_curr,
@vector_step_33_curr,
@vector_step_34_curr,
@vector_step_35_curr,
@vector_step_36_curr,
@vector_step_37_curr,
@vector_step_38_curr,
@vector_step_39_curr,
@vector_step_40_curr,
@vector_step_41_curr,
@vector_step_42_curr,
@vector_step_43_curr,
@vector_step_44_curr,
@vector_step_45_curr,
@vector_step_46_curr,
@vector_step_47_curr,
@vector_step_48_curr,
@vector_step_49_curr,
@vector_step_50_curr,
@vector_step_51_curr,
@vector_step_52_curr,
@vector_step_53_curr,
@vector_step_54_curr,
@vector_step_55_curr,
@vector_step_56_curr,
@vector_step_57_curr,
@vector_step_58_curr,
@vector_step_59_curr,
@vector_step_60_curr,
@vector_step_61_curr,
@vector_step_62_curr,
@vector_step_63_curr,
@vector_step_64_curr,
@vector_step_65_curr,
@vector_step_66_curr,
@vector_step_67_curr,
@vector_step_68_curr,
@vector_step_69_curr,
@vector_step_70_curr,
@vector_step_71_curr,
@vector_step_72_curr,
@vector_step_73_curr,
@vector_step_74_curr,
@vector_step_75_curr,
@vector_step_76_curr,
@vector_step_77_curr,
@vector_step_78_curr,
@vector_step_79_curr,
@vector_step_80_curr,
@vector_step_81_curr,
@vector_step_82_curr,
@vector_step_83_curr,
@vector_step_84_curr,
@vector_step_85_curr,
@vector_step_86_curr,
@vector_step_87_curr,
@vector_step_88_curr,
@vector_step_89_curr,
@vector_step_90_curr,
@vector_step_91_curr,
@vector_step_92_curr,
@vector_step_93_curr,
@vector_step_94_curr,
@vector_step_95_curr,
@vector_step_96_curr,
@vector_step_97_curr,
@vector_step_98_curr,
@vector_step_99_curr,
@vector_step_100_curr,
@civ_version,
@civ_addeddate,
@civ_updatedby,
@civ_isdeleted

while @@fetch_status = 0
begin
declare c_prev cursor for select
AvayaSDKVector.bcid,
AvayaSDKVector.bcversion,
AvayaSDKVector.vectornumber,
AvayaSDKVector.vectorname,
AvayaSDKVector.multimedia ,
AvayaSDKVector.lock ,
AvayaSDKVector.attendant,
AvayaSDKVector.meet_me_conf ,
AvayaSDKVector.native_name_1,
AvayaSDKVector.native_name_2,
AvayaSDKVector.native_name_3,
AvayaSDKVector.native_name_4,
AvayaSDKVector.native_name_5,
AvayaSDKVector.native_name_scripts,
AvayaSDKVector.vector_step_1,
AvayaSDKVector.vector_step_2,
AvayaSDKVector.vector_step_3,
AvayaSDKVector.vector_step_4,
AvayaSDKVector.vector_step_5,
AvayaSDKVector.vector_step_6,
AvayaSDKVector.vector_step_7,
AvayaSDKVector.vector_step_8,
AvayaSDKVector.vector_step_9,
AvayaSDKVector.vector_step_10,
AvayaSDKVector.vector_step_11,
AvayaSDKVector.vector_step_12,
AvayaSDKVector.vector_step_13,
AvayaSDKVector.vector_step_14,
AvayaSDKVector.vector_step_15,
AvayaSDKVector.vector_step_16,
AvayaSDKVector.vector_step_17,
AvayaSDKVector.vector_step_18,
AvayaSDKVector.vector_step_19,
AvayaSDKVector.vector_step_20,
AvayaSDKVector.vector_step_21,
AvayaSDKVector.vector_step_22,
AvayaSDKVector.vector_step_23,
AvayaSDKVector.vector_step_24,
AvayaSDKVector.vector_step_25,
AvayaSDKVector.vector_step_26,
AvayaSDKVector.vector_step_27,
AvayaSDKVector.vector_step_28,
AvayaSDKVector.vector_step_29,
AvayaSDKVector.vector_step_30,
AvayaSDKVector.vector_step_31,
AvayaSDKVector.vector_step_32,
AvayaSDKVector.vector_step_33,
AvayaSDKVector.vector_step_34,
AvayaSDKVector.vector_step_35,
AvayaSDKVector.vector_step_36,
AvayaSDKVector.vector_step_37,
AvayaSDKVector.vector_step_38,
AvayaSDKVector.vector_step_39,
AvayaSDKVector.vector_step_40,
AvayaSDKVector.vector_step_41,
AvayaSDKVector.vector_step_42,
AvayaSDKVector.vector_step_43,
AvayaSDKVector.vector_step_44,
AvayaSDKVector.vector_step_45,
AvayaSDKVector.vector_step_46,
AvayaSDKVector.vector_step_47,
AvayaSDKVector.vector_step_48,
AvayaSDKVector.vector_step_49,
AvayaSDKVector.vector_step_50,
AvayaSDKVector.vector_step_51,
AvayaSDKVector.vector_step_52,
AvayaSDKVector.vector_step_53,
AvayaSDKVector.vector_step_54,
AvayaSDKVector.vector_step_55,
AvayaSDKVector.vector_step_56,
AvayaSDKVector.vector_step_57,
AvayaSDKVector.vector_step_58,
AvayaSDKVector.vector_step_59,
AvayaSDKVector.vector_step_60,
AvayaSDKVector.vector_step_61,
AvayaSDKVector.vector_step_62,
AvayaSDKVector.vector_step_63,
AvayaSDKVector.vector_step_64,
AvayaSDKVector.vector_step_65,
AvayaSDKVector.vector_step_66,
AvayaSDKVector.vector_step_67,
AvayaSDKVector.vector_step_68,
AvayaSDKVector.vector_step_69,
AvayaSDKVector.vector_step_70,
AvayaSDKVector.vector_step_71,
AvayaSDKVector.vector_step_72,
AvayaSDKVector.vector_step_73,
AvayaSDKVector.vector_step_74,
AvayaSDKVector.vector_step_75,
AvayaSDKVector.vector_step_76,
AvayaSDKVector.vector_step_77,
AvayaSDKVector.vector_step_78,
AvayaSDKVector.vector_step_79,
AvayaSDKVector.vector_step_80,
AvayaSDKVector.vector_step_81,
AvayaSDKVector.vector_step_82,
AvayaSDKVector.vector_step_83,
AvayaSDKVector.vector_step_84,
AvayaSDKVector.vector_step_85,
AvayaSDKVector.vector_step_86,
AvayaSDKVector.vector_step_87,
AvayaSDKVector.vector_step_88,
AvayaSDKVector.vector_step_89,
AvayaSDKVector.vector_step_90,
AvayaSDKVector.vector_step_91,
AvayaSDKVector.vector_step_92,
AvayaSDKVector.vector_step_93,
AvayaSDKVector.vector_step_94,
AvayaSDKVector.vector_step_95,
AvayaSDKVector.vector_step_96,
AvayaSDKVector.vector_step_97,
AvayaSDKVector.vector_step_98,
AvayaSDKVector.vector_step_99,
AvayaSDKVector.vector_step_100

from AvayaSDKVector where AvayaSDKVector.BCID = @bcid_curr and AvayaSDKVector.BCVersion = @bcversion_curr - 1

open c_prev
fetch next from c_prev into
@bcid_prev,
@bcversion_prev,
@vectornumber_prev,
@vectorname_prev,
@multimedia_prev,
@lock_prev,
@attendant_prev,
@meet_me_conf_prev,
@native_name_1_prev,
@native_name_2_prev,
@native_name_3_prev,
@native_name_4_prev,
@native_name_5_prev,
@native_name_scripts_prev,
@vector_step_1_prev,
@vector_step_2_prev,
@vector_step_3_prev,
@vector_step_4_prev,
@vector_step_5_prev,
@vector_step_6_prev,
@vector_step_7_prev,
@vector_step_8_prev,
@vector_step_9_prev,
@vector_step_10_prev,
@vector_step_11_prev,
@vector_step_12_prev,
@vector_step_13_prev,
@vector_step_14_prev,
@vector_step_15_prev,
@vector_step_16_prev,
@vector_step_17_prev,
@vector_step_18_prev,
@vector_step_19_prev,
@vector_step_20_prev,
@vector_step_21_prev,
@vector_step_22_prev,
@vector_step_23_prev,
@vector_step_24_prev,
@vector_step_25_prev,
@vector_step_26_prev,
@vector_step_27_prev,
@vector_step_28_prev,
@vector_step_29_prev,
@vector_step_30_prev,
@vector_step_31_prev,
@vector_step_32_prev,
@vector_step_33_prev,
@vector_step_34_prev,
@vector_step_35_prev,
@vector_step_36_prev,
@vector_step_37_prev,
@vector_step_38_prev,
@vector_step_39_prev,
@vector_step_40_prev,
@vector_step_41_prev,
@vector_step_42_prev,
@vector_step_43_prev,
@vector_step_44_prev,
@vector_step_45_prev,
@vector_step_46_prev,
@vector_step_47_prev,
@vector_step_48_prev,
@vector_step_49_prev,
@vector_step_50_prev,
@vector_step_51_prev,
@vector_step_52_prev,
@vector_step_53_prev,
@vector_step_54_prev,
@vector_step_55_prev,
@vector_step_56_prev,
@vector_step_57_prev,
@vector_step_58_prev,
@vector_step_59_prev,
@vector_step_60_prev,
@vector_step_61_prev,
@vector_step_62_prev,
@vector_step_63_prev,
@vector_step_64_prev,
@vector_step_65_prev,
@vector_step_66_prev,
@vector_step_67_prev,
@vector_step_68_prev,
@vector_step_69_prev,
@vector_step_70_prev,
@vector_step_71_prev,
@vector_step_72_prev,
@vector_step_73_prev,
@vector_step_74_prev,
@vector_step_75_prev,
@vector_step_76_prev,
@vector_step_77_prev,
@vector_step_78_prev,
@vector_step_79_prev,
@vector_step_80_prev,
@vector_step_81_prev,
@vector_step_82_prev,
@vector_step_83_prev,
@vector_step_84_prev,
@vector_step_85_prev,
@vector_step_86_prev,
@vector_step_87_prev,
@vector_step_88_prev,
@vector_step_89_prev,
@vector_step_90_prev,
@vector_step_91_prev,
@vector_step_92_prev,
@vector_step_93_prev,
@vector_step_94_prev,
@vector_step_95_prev,
@vector_step_96_prev,
@vector_step_97_prev,
@vector_step_98_prev,
@vector_step_99_prev,
@vector_step_100_prev


while @@fetch_status = 0
begin

if (isnull(@vectornumber_curr,0) <> isnull(@vectornumber_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vectornumber'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vectornumber_prev, @vectornumber_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vectorname_curr,0) <> isnull(@vectorname_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vectorname'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vectorname_prev, @vectorname_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@multimedia_curr,0) <> isnull(@multimedia_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'multimedia'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @multimedia_prev, @multimedia_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@lock_curr,0) <> isnull(@lock_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'lock'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @lock_prev, @lock_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@attendant_curr,0) <> isnull(@attendant_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'attendant'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @attendant_prev, @attendant_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@meet_me_conf_curr,0) <> isnull(@meet_me_conf_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'meet_me_conf'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @meet_me_conf_prev, @meet_me_conf_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_1_curr,0) <> isnull(@native_name_1_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_1'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_1_prev, @native_name_1_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_2_curr,0) <> isnull(@native_name_2_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_2'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_2_prev, @native_name_2_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_3_curr,0) <> isnull(@native_name_3_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_3'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_3_prev, @native_name_3_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_4_curr,0) <> isnull(@native_name_4_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_4'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_4_prev, @native_name_4_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_5_curr,0) <> isnull(@native_name_5_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_5'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_5_prev, @native_name_5_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@native_name_scripts_curr,0) <> isnull(@native_name_scripts_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'native_name_scripts'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @native_name_scripts_prev, @native_name_scripts_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_1_curr,0) <> isnull(@vector_step_1_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_1'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_1_prev, @vector_step_1_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_2_curr,0) <> isnull(@vector_step_2_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_2'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_2_prev, @vector_step_2_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_3_curr,0) <> isnull(@vector_step_3_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_3'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_3_prev, @vector_step_3_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_4_curr,0) <> isnull(@vector_step_4_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_4'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_4_prev, @vector_step_4_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_5_curr,0) <> isnull(@vector_step_5_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_5'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_5_prev, @vector_step_5_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_6_curr,0) <> isnull(@vector_step_6_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_6'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_6_prev, @vector_step_6_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_7_curr,0) <> isnull(@vector_step_7_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_7'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_7_prev, @vector_step_7_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_8_curr,0) <> isnull(@vector_step_8_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_8'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_8_prev, @vector_step_8_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_9_curr,0) <> isnull(@vector_step_9_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_9'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_9_prev, @vector_step_9_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_10_curr,0) <> isnull(@vector_step_10_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_10'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_10_prev, @vector_step_10_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_11_curr,0) <> isnull(@vector_step_11_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_11'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_11_prev, @vector_step_11_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_12_curr,0) <> isnull(@vector_step_12_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_12'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_12_prev, @vector_step_12_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_13_curr,0) <> isnull(@vector_step_13_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_13'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_13_prev, @vector_step_13_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_14_curr,0) <> isnull(@vector_step_14_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_14'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_14_prev, @vector_step_14_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_15_curr,0) <> isnull(@vector_step_15_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_15'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_15_prev, @vector_step_15_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_16_curr,0) <> isnull(@vector_step_16_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_16'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_16_prev, @vector_step_16_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_17_curr,0) <> isnull(@vector_step_17_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_17'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_17_prev, @vector_step_17_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_18_curr,0) <> isnull(@vector_step_18_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_18'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_18_prev, @vector_step_18_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_19_curr,0) <> isnull(@vector_step_19_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_19'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_19_prev, @vector_step_19_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_20_curr,0) <> isnull(@vector_step_20_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_20'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_20_prev, @vector_step_20_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_21_curr,0) <> isnull(@vector_step_21_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_21'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_21_prev, @vector_step_21_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_22_curr,0) <> isnull(@vector_step_22_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_22'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_22_prev, @vector_step_22_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_23_curr,0) <> isnull(@vector_step_23_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_23'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_23_prev, @vector_step_23_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_24_curr,0) <> isnull(@vector_step_24_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_24'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_24_prev, @vector_step_24_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_25_curr,0) <> isnull(@vector_step_25_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_25'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_25_prev, @vector_step_25_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_26_curr,0) <> isnull(@vector_step_26_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_26'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_26_prev, @vector_step_26_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_27_curr,0) <> isnull(@vector_step_27_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_27'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_27_prev, @vector_step_27_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_28_curr,0) <> isnull(@vector_step_28_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_28'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_28_prev, @vector_step_28_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_29_curr,0) <> isnull(@vector_step_29_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_29'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_29_prev, @vector_step_29_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_30_curr,0) <> isnull(@vector_step_30_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_30'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_30_prev, @vector_step_30_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_31_curr,0) <> isnull(@vector_step_31_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_31'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_31_prev, @vector_step_31_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_32_curr,0) <> isnull(@vector_step_32_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_32'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_32_prev, @vector_step_32_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_33_curr,0) <> isnull(@vector_step_33_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_33'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_33_prev, @vector_step_33_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_34_curr,0) <> isnull(@vector_step_34_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_34'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_34_prev, @vector_step_34_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_35_curr,0) <> isnull(@vector_step_35_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_35'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_35_prev, @vector_step_35_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_36_curr,0) <> isnull(@vector_step_36_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_36'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_36_prev, @vector_step_36_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_37_curr,0) <> isnull(@vector_step_37_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_37'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_37_prev, @vector_step_37_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_38_curr,0) <> isnull(@vector_step_38_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_38'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_38_prev, @vector_step_38_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_39_curr,0) <> isnull(@vector_step_39_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_39'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_39_prev, @vector_step_39_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_40_curr,0) <> isnull(@vector_step_40_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_40'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_40_prev, @vector_step_40_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_41_curr,0) <> isnull(@vector_step_41_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_41'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_41_prev, @vector_step_41_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_42_curr,0) <> isnull(@vector_step_42_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_42'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_42_prev, @vector_step_42_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_43_curr,0) <> isnull(@vector_step_43_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_43'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_43_prev, @vector_step_43_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_44_curr,0) <> isnull(@vector_step_44_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_44'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_44_prev, @vector_step_44_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_45_curr,0) <> isnull(@vector_step_45_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_45'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_45_prev, @vector_step_45_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_46_curr,0) <> isnull(@vector_step_46_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_46'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_46_prev, @vector_step_46_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_47_curr,0) <> isnull(@vector_step_47_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_47'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_47_prev, @vector_step_47_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_48_curr,0) <> isnull(@vector_step_48_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_48'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_48_prev, @vector_step_48_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_49_curr,0) <> isnull(@vector_step_49_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_49'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_49_prev, @vector_step_49_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_50_curr,0) <> isnull(@vector_step_50_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_50'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_50_prev, @vector_step_50_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_51_curr,0) <> isnull(@vector_step_51_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_51'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_51_prev, @vector_step_51_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_52_curr,0) <> isnull(@vector_step_52_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_52'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_52_prev, @vector_step_52_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_53_curr,0) <> isnull(@vector_step_53_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_53'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_53_prev, @vector_step_53_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_54_curr,0) <> isnull(@vector_step_54_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_54'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_54_prev, @vector_step_54_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_55_curr,0) <> isnull(@vector_step_55_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_55'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_55_prev, @vector_step_55_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_56_curr,0) <> isnull(@vector_step_56_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_56'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_56_prev, @vector_step_56_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_57_curr,0) <> isnull(@vector_step_57_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_57'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_57_prev, @vector_step_57_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_58_curr,0) <> isnull(@vector_step_58_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_58'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_58_prev, @vector_step_58_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_59_curr,0) <> isnull(@vector_step_59_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_59'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_59_prev, @vector_step_59_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_60_curr,0) <> isnull(@vector_step_60_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_60'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_60_prev, @vector_step_60_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_61_curr,0) <> isnull(@vector_step_61_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_61'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_61_prev, @vector_step_61_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_62_curr,0) <> isnull(@vector_step_62_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_62'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_62_prev, @vector_step_62_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_63_curr,0) <> isnull(@vector_step_63_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_63'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_63_prev, @vector_step_63_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_64_curr,0) <> isnull(@vector_step_64_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_64'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_64_prev, @vector_step_64_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_65_curr,0) <> isnull(@vector_step_65_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_65'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_65_prev, @vector_step_65_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_66_curr,0) <> isnull(@vector_step_66_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_66'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_66_prev, @vector_step_66_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_67_curr,0) <> isnull(@vector_step_67_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_67'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_67_prev, @vector_step_67_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_68_curr,0) <> isnull(@vector_step_68_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_68'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_68_prev, @vector_step_68_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_69_curr,0) <> isnull(@vector_step_69_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_69'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_69_prev, @vector_step_69_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_70_curr,0) <> isnull(@vector_step_70_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_70'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_70_prev, @vector_step_70_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_71_curr,0) <> isnull(@vector_step_71_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_71'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_71_prev, @vector_step_71_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_72_curr,0) <> isnull(@vector_step_72_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_72'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_72_prev, @vector_step_72_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_73_curr,0) <> isnull(@vector_step_73_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_73'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_73_prev, @vector_step_73_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_74_curr,0) <> isnull(@vector_step_74_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_74'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_74_prev, @vector_step_74_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_75_curr,0) <> isnull(@vector_step_75_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_75'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_75_prev, @vector_step_75_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_76_curr,0) <> isnull(@vector_step_76_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_76'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_76_prev, @vector_step_76_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_77_curr,0) <> isnull(@vector_step_77_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_77'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_77_prev, @vector_step_77_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_78_curr,0) <> isnull(@vector_step_78_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_78'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_78_prev, @vector_step_78_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_79_curr,0) <> isnull(@vector_step_79_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_79'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_79_prev, @vector_step_79_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_80_curr,0) <> isnull(@vector_step_80_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_80'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_80_prev, @vector_step_80_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_81_curr,0) <> isnull(@vector_step_81_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_81'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_81_prev, @vector_step_81_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_82_curr,0) <> isnull(@vector_step_82_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_82'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_82_prev, @vector_step_82_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_83_curr,0) <> isnull(@vector_step_83_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_83'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_83_prev, @vector_step_83_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_84_curr,0) <> isnull(@vector_step_84_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_84'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_84_prev, @vector_step_84_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_85_curr,0) <> isnull(@vector_step_85_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_85'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_85_prev, @vector_step_85_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_86_curr,0) <> isnull(@vector_step_86_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_86'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_86_prev, @vector_step_86_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_87_curr,0) <> isnull(@vector_step_87_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_87'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_87_prev, @vector_step_87_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_88_curr,0) <> isnull(@vector_step_88_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_88'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_88_prev, @vector_step_88_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_89_curr,0) <> isnull(@vector_step_89_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_89'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_89_prev, @vector_step_89_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_90_curr,0) <> isnull(@vector_step_90_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_90'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_90_prev, @vector_step_90_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_91_curr,0) <> isnull(@vector_step_91_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_91'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_91_prev, @vector_step_91_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_92_curr,0) <> isnull(@vector_step_92_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_92'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_92_prev, @vector_step_92_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_93_curr,0) <> isnull(@vector_step_93_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_93'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_93_prev, @vector_step_93_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_94_curr,0) <> isnull(@vector_step_94_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_94'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_94_prev, @vector_step_94_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_95_curr,0) <> isnull(@vector_step_95_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_95'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_95_prev, @vector_step_95_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_96_curr,0) <> isnull(@vector_step_96_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_96'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_96_prev, @vector_step_96_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_97_curr,0) <> isnull(@vector_step_97_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_97'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_97_prev, @vector_step_97_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_98_curr,0) <> isnull(@vector_step_98_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_98'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_98_prev, @vector_step_98_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_99_curr,0) <> isnull(@vector_step_99_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_99'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_99_prev, @vector_step_99_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

if (isnull(@vector_step_100_curr,0) <> isnull(@vector_step_100_prev,0))
begin
select @readablename = ReadableName from DataDictionaryEntry
where TableName = 'AvayaSDKVector' and FieldName = 'vector_step_100'
insert into #out (VectorNumber,PropertyName, PreviousValue, CurrentValue, Version, AddedDate, UpdatedBy, IsDeleted, BCID) values (@vectornumber_curr, @readablename, @vector_step_100_prev, @vector_step_100_curr, @civ_version, @civ_addeddate, @civ_updatedby, @civ_isdeleted, @bcid_curr)
end

fetch next from c_prev into
@bcid_prev,
@bcversion_prev,
@vectornumber_prev,
@vectorname_prev,
@multimedia_prev,
@lock_prev,
@attendant_prev,
@meet_me_conf_prev,
@native_name_1_prev,
@native_name_2_prev,
@native_name_3_prev,
@native_name_4_prev,
@native_name_5_prev,
@native_name_scripts_prev,
@vector_step_1_prev,
@vector_step_2_prev,
@vector_step_3_prev,
@vector_step_4_prev,
@vector_step_5_prev,
@vector_step_6_prev,
@vector_step_7_prev,
@vector_step_8_prev,
@vector_step_9_prev,
@vector_step_10_prev,
@vector_step_11_prev,
@vector_step_12_prev,
@vector_step_13_prev,
@vector_step_14_prev,
@vector_step_15_prev,
@vector_step_16_prev,
@vector_step_17_prev,
@vector_step_18_prev,
@vector_step_19_prev,
@vector_step_20_prev,
@vector_step_21_prev,
@vector_step_22_prev,
@vector_step_23_prev,
@vector_step_24_prev,
@vector_step_25_prev,
@vector_step_26_prev,
@vector_step_27_prev,
@vector_step_28_prev,
@vector_step_29_prev,
@vector_step_30_prev,
@vector_step_31_prev,
@vector_step_32_prev,
@vector_step_33_prev,
@vector_step_34_prev,
@vector_step_35_prev,
@vector_step_36_prev,
@vector_step_37_prev,
@vector_step_38_prev,
@vector_step_39_prev,
@vector_step_40_prev,
@vector_step_41_prev,
@vector_step_42_prev,
@vector_step_43_prev,
@vector_step_44_prev,
@vector_step_45_prev,
@vector_step_46_prev,
@vector_step_47_prev,
@vector_step_48_prev,
@vector_step_49_prev,
@vector_step_50_prev,
@vector_step_51_prev,
@vector_step_52_prev,
@vector_step_53_prev,
@vector_step_54_prev,
@vector_step_55_prev,
@vector_step_56_prev,
@vector_step_57_prev,
@vector_step_58_prev,
@vector_step_59_prev,
@vector_step_60_prev,
@vector_step_61_prev,
@vector_step_62_prev,
@vector_step_63_prev,
@vector_step_64_prev,
@vector_step_65_prev,
@vector_step_66_prev,
@vector_step_67_prev,
@vector_step_68_prev,
@vector_step_69_prev,
@vector_step_70_prev,
@vector_step_71_prev,
@vector_step_72_prev,
@vector_step_73_prev,
@vector_step_74_prev,
@vector_step_75_prev,
@vector_step_76_prev,
@vector_step_77_prev,
@vector_step_78_prev,
@vector_step_79_prev,
@vector_step_80_prev,
@vector_step_81_prev,
@vector_step_82_prev,
@vector_step_83_prev,
@vector_step_84_prev,
@vector_step_85_prev,
@vector_step_86_prev,
@vector_step_87_prev,
@vector_step_88_prev,
@vector_step_89_prev,
@vector_step_90_prev,
@vector_step_91_prev,
@vector_step_92_prev,
@vector_step_93_prev,
@vector_step_94_prev,
@vector_step_95_prev,
@vector_step_96_prev,
@vector_step_97_prev,
@vector_step_98_prev,
@vector_step_99_prev,
@vector_step_100_prev
end
close c_prev
deallocate c_prev

fetch next from c_curr into
@bcid_curr,
@bcversion_curr,
@vectornumber_curr,
@vectorname_curr,
@multimedia_curr,
@lock_curr,
@attendant_curr,
@meet_me_conf_curr,
@native_name_1_curr,
@native_name_2_curr,
@native_name_3_curr,
@native_name_4_curr,
@native_name_5_curr,
@native_name_scripts_curr,
@vector_step_1_curr,
@vector_step_2_curr,
@vector_step_3_curr,
@vector_step_4_curr,
@vector_step_5_curr,
@vector_step_6_curr,
@vector_step_7_curr,
@vector_step_8_curr,
@vector_step_9_curr,
@vector_step_10_curr,
@vector_step_11_curr,
@vector_step_12_curr,
@vector_step_13_curr,
@vector_step_14_curr,
@vector_step_15_curr,
@vector_step_16_curr,
@vector_step_17_curr,
@vector_step_18_curr,
@vector_step_19_curr,
@vector_step_20_curr,
@vector_step_21_curr,
@vector_step_22_curr,
@vector_step_23_curr,
@vector_step_24_curr,
@vector_step_25_curr,
@vector_step_26_curr,
@vector_step_27_curr,
@vector_step_28_curr,
@vector_step_29_curr,
@vector_step_30_curr,
@vector_step_31_curr,
@vector_step_32_curr,
@vector_step_33_curr,
@vector_step_34_curr,
@vector_step_35_curr,
@vector_step_36_curr,
@vector_step_37_curr,
@vector_step_38_curr,
@vector_step_39_curr,
@vector_step_40_curr,
@vector_step_41_curr,
@vector_step_42_curr,
@vector_step_43_curr,
@vector_step_44_curr,
@vector_step_45_curr,
@vector_step_46_curr,
@vector_step_47_curr,
@vector_step_48_curr,
@vector_step_49_curr,
@vector_step_50_curr,
@vector_step_51_curr,
@vector_step_52_curr,
@vector_step_53_curr,
@vector_step_54_curr,
@vector_step_55_curr,
@vector_step_56_curr,
@vector_step_57_curr,
@vector_step_58_curr,
@vector_step_59_curr,
@vector_step_60_curr,
@vector_step_61_curr,
@vector_step_62_curr,
@vector_step_63_curr,
@vector_step_64_curr,
@vector_step_65_curr,
@vector_step_66_curr,
@vector_step_67_curr,
@vector_step_68_curr,
@vector_step_69_curr,
@vector_step_70_curr,
@vector_step_71_curr,
@vector_step_72_curr,
@vector_step_73_curr,
@vector_step_74_curr,
@vector_step_75_curr,
@vector_step_76_curr,
@vector_step_77_curr,
@vector_step_78_curr,
@vector_step_79_curr,
@vector_step_80_curr,
@vector_step_81_curr,
@vector_step_82_curr,
@vector_step_83_curr,
@vector_step_84_curr,
@vector_step_85_curr,
@vector_step_86_curr,
@vector_step_87_curr,
@vector_step_88_curr,
@vector_step_89_curr,
@vector_step_90_curr,
@vector_step_91_curr,
@vector_step_92_curr,
@vector_step_93_curr,
@vector_step_94_curr,
@vector_step_95_curr,
@vector_step_96_curr,
@vector_step_97_curr,
@vector_step_98_curr,
@vector_step_99_curr,
@vector_step_100_curr,
@civ_version,
@civ_addeddate,
@civ_updatedby,
@civ_isdeleted
end
close c_curr
deallocate c_curr

select * from #out order by AddedDate asc

drop table #out

end





Edited by - sprotson on 03/04/2013 06:04:31
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/04/2013 :  06:17:17  Show Profile  Reply with Quote
sounds like what you need is kind of left join logic

i would have dispensed with cursor and gone for left join logic to get current and previous version data if existing

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sprotson
Yak Posting Veteran

70 Posts

Posted - 03/04/2013 :  06:37:41  Show Profile  Reply with Quote
Thanks, however I would rather stick with the format of the sproc as it is.

Is it possible to do a second fetch? eg while @@fetch_status = 0 and @bcversion_curr =1 begin

I am really not sure what would need to be added into the sproc to accomplish this
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 3.51 seconds. Powered By: Snitz Forums 2000