62,074
社区成员
发帖
与我相关
我的任务
分享
if((select count(*) from eap_history)=10)
begin
update eap_history set Name='收款单',url='ARAP/ReceiveVoucherEdit.aspx?SourceType=FromMenu',code='ARAP01',recordtime='2009-02-16 15:58:04' where recordtime =(select min(recordtime) from eap_history)
end
else
begin
if(exists(select * from eap_history where UserID ='8bbccdc8-b137-4a33-b253-7929b4473157' and code ='ARAP01'))
begin
update eap_history set Name='收款单',url='ARAP/ReceiveVoucherEdit.aspx?SourceType=FromMenu',code='ARAP01',recordtime='2009-02-16 15:58:04' where userid='8bbccdc8-b137-4a33-b253-7929b4473157' and code ='ARAP01'
end
else
begin
insert into eap_history values( 'a5a297b3-095f-4011-b210-c3d3af11b535', '收款单','ARAP/ReceiveVoucherEdit.aspx?SourceType=FromMenu','ARAP01','8bbccdc8-b137-4a33-b253-7929b4473157','2009-02-16 15:58:04')
end
end