create proc Proc_GetOrderInfo_ByStatus( @Flag int)asdeclare @Msql varchar(1024)set @Msql = 'select * from vw_aspnet_OrderInfo where 1=1 'if(@Flag=1) set @Msql = @Msql + 'and IsConfirm = ''false'''else if(@Flag=2) set @Msql = @Msql + 'and IsConfirm = ''true'''else if(@Flag=3) set @Msql = @Msql + 'and IsConsignment = ''false'''else if(@Flag=4) set @Msql = @Msql + 'and IsConsignment = ''true'''else if(@Flag=5) set @Msql = @Msql + 'and IsPayment = ''false'''else if(@Flag=6) set @Msql = @Msql + 'and IsPayment = ''true'''else if(@Flag=7) set @Msql = @Msql + 'and IsPigeonhole = ''false'''else if(@Flag=8) set @Msql = @Msql + 'and IsPigeonhole = ''true'''exec(@Msql)
create proc Proc_GetOrderInfo_ByStatus( @Flag i