第一:定义 @strsql
SET @strsql='
INSERT INTO SEOrder(FExSeorderNo,FExSeorderVal,FInterID,FBillNo,FBrNo,FTranType,FCancellation,FStatus,FDiscountType,Fdate,
FCustID,FSaleStyle,FFetchStyle,FCurrencyID,FFetchAdd,FCheckDate,FMangerID,FDeptID,FEmpID,FBillerID,
FSettleID,FExchangeRate,FPOOrdBillNo,FRelateBrID,
FTransitAheadTime,FImport,FSelTranType,FBrID,FSettleDate,FExplanation,FAreaPS,FManageType,FSysStatus,FValidaterName,
FVersionNo,FChangeDate,FChangeUser,FConsignee,FChangeCauses,FChangeMark,'+ @FiledIsInRate +',FPrintCount)
VALUES(@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12,@P13,@P14,@P15,@P16,@P17,@P18,@P19,@P20,
@P21,@P22,@P29,@P30,@P31,@P32,@P33,@P34,@P35,@P36,@P37,@P38,@P39,@P40,
@P41,@P42,@P43,@P44,@P45,@P46,@P47,@P48)'
EXEC sp_executesql @strsql,
N'@P1 varchar(255),@P2 varchar(255),@P3 int,@P4 varchar(255),@P5 varchar(10),@P6 INT,@P7 INT ,@P8 smallint ,@P9 bit ,@P10 varchar(255),
@P11 INT ,@P12 INT ,@P13 varchar(30),@P14 int ,@P15 varchar(255),@P16 varchar(255),@P17 int ,@P18 int,@P19 int ,@P20 int ,
@P21 int,@P22 float,@P29 varchar(255),@P30 int,
@P31 varchar(255),@P32 int,@P33 int,@P34 int,@P35 varchar(255),@P36 varchar(4000),@P37 int,@P38 int ,@P39 smallint,@P40 varchar(255),
@P41 varchar(255),@P42 varchar(255),@P43 int ,@P44 varchar(255),@P45 varchar(255),@P46 int,@P47 int,@P48 smallint',
N'',N'', @fInterid ,@FBillNo ,N'0',81,0,0,0,@fdate,
@FCustID ,101,N'1005',1,N'',NULL,0,@FDeptID ,@FEmpID ,16394,
2,1,N'',0,
N'1',0,1007006,0,NULL, @FExplanation,20302,0,2,N'',
N'000',NULL,0,0,N'',N'',@FIsInRateInterId,0