|
发表于 2020-1-17 09:00:01
|
显示全部楼层
--测试环境
create table tbnote_check_order
(
f_djlxbm varchar(3) Not Null, --单据类型编码
f_xh int Not Null, --序号
f_bmbm varchar(15) Not Null, --部门编码
f_must int Not Null, --必须(0否1是)
Constraint tbnote_check_order_key Primary Key(f_djlxbm,f_xh)
)
insert into tbnote_check_order
select 'abc',1,'001',1 union all
select 'abc',2,'002',0 union all
select 'abc',3,'004',1
declare @c int
exec p_SpIsOver 'abc','|linebegin|haha2007-1-1|bmbegin|001|bmend|hehe123|ygbmbegin|001|ygbmend|sdjklsd|lineend|',@c out
select @c
--result
0
declare @c int
exec p_SpIsOver 'abc','|linebegin|haha2007-1-1|bmbegin|001|bmend|hehe123|ygbmbegin|001|ygbmend|sdjklsd|lineend|
|linebegin|haha2007-2-1|bmbegin|004|bmend|hehe123|ygbmbegin|001|ygbmend|sdjkfddfdfssfdlsd|lineend|
',@c out
select @c
--result
1
declare @c int
exec p_SpIsOver 'abc','|linebegin|haha2007-1-1|bmbegin|001|bmend|hehe123|ygbmbegin|001|ygbmend|sdjklsd|lineend|
|linebegin|haha2007-2-1|bmbegin|002|bmend|hehe123|ygbmbegin|001|ygbmend|sdjkfddfdfssfdlsd|lineend|
',@c out
select @c
--result
0
declare @c int
exec p_SpIsOver 'abc','|linebegin|haha2007-1-1|bmbegin|001|bmend|hehe123|ygbmbegin|001|ygbmend|sdjklsd|lineend|
|linebegin|haha2007-2-1|bmbegin|002|bmend|hehe123|ygbmbegin|001|ygbmend|sdjkfddfdfssfdlsd|lineend|
|linebegin|haha2007-2-1|bmbegin|004|bmend|hehe123|ygbmbegin|001|ygbmend|sdjkfddfdfssfdlsd|lineend|
',@c out
select @c
--result
1
|
|