SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
alter Proc usp_GetSectionMO_TEST(@FDate varchar(30)='',@Section varchar(30)='',@StyleNo varchar(30)='',@Type varchar(30)='')
as
begin
if isnull(@FDate,'')='' select @FDate='2013-04-29'
if isnull(@Section,'')='' select @Section='A'
if isnull(@StyleNo,'')='' select @StyleNo=''
if isnull(@Type,'')='' select @Type=''
Create Table #Re_Table(
T1_MO_Code VARCHAR(16) NULL,
T1_HK_MO_Code VARCHAR(16) NULL,
T1_FDate VARCHAR(10) NULL,
T1_Style_NO VARCHAR(16) NULL,
T1_Color VARCHAR(26) NULL,
T1_Customer VARCHAR(30) NULL,
T1_Group_No VARCHAR(10) NULL,
T1_CurCode VARCHAR(10) NULL,
T1_LongNameUp NVARCHAR(255) NULL,
T1_PageNo INT NULL,
T1_Remark NVARCHAR(100) NULL,
T1_RS INT NULL,
T1_isQj INT NULL,
T1_G_kgts FLOAT NULL,
T1_isKG INT NULL,
T1_isCW INT NULL,
T1_isZG INT NULL,
T1_RS_T INT NULL,
T1_isQj_T INT NULL,
T1_G_kgts_T FLOAT NULL,
T1_isKG_T INT NULL,
T1_isCW_T INT NULL,
T1_isZG_T INT NULL,
T1_RS_A INT NULL,
T1_isQj_A INT NULL,
T1_G_kgts_A FLOAT NULL,
T1_isKG_A INT NULL,
T1_isCW_A INT NULL,
T1_isZG_A INT NULL,
T2_MO_Code VARCHAR(16) NULL,
T2_HK_MO_Code VARCHAR(16) NULL,
T2_FDate VARCHAR(10) NULL,
T2_Style_NO VARCHAR(16) NULL,
T2_Color VARCHAR(26) NULL,
T2_Customer VARCHAR(30) NULL,
T2_Group_No VARCHAR(10) NULL,
T2_CurCode VARCHAR(10) NULL,
T2_LongNameUp NVARCHAR(255) NULL,
T2_PageNo INT NULL,
T2_Remark NVARCHAR(100) NULL,
T2_RS INT NULL,
T2_isQj INT NULL,
T2_G_kgts FLOAT NULL,
T2_isKG INT NULL,
T2_isCW INT NULL,
T2_isZG INT NULL,
T2_RS_T INT NULL,
T2_isQj_T INT NULL,
T2_G_kgts_T FLOAT NULL,
T2_isKG_T INT NULL,
T2_isCW_T INT NULL,
T2_isZG_T INT NULL,
T2_RS_A INT NULL,
T2_isQj_A INT NULL,
T2_G_kgts_A FLOAT NULL,
T2_isKG_A INT NULL,
T2_isCW_A INT NULL,
T2_isZG_A INT NULL,
T3_MO_Code VARCHAR(16) NULL,
T3_HK_MO_Code VARCHAR(16) NULL,
T3_FDate VARCHAR(10) NULL,