解决方案 »
- 在两个阶段之间,对一行数据进行更新,同时拒绝其他的更新,可以被查看
- 请问SELECT * FROM ::中符号::和collation_name ::={windows_collation_name}|{sql_collation_name}中符号::=是什么意思?
- PROC中的条件判断
- 为什么没人答?
- 什么是数据库概念模型,模式设计?
- 帮帮忙呀,,,在线等
- 用SQL语句实现数据统计,一个比较麻烦的SQl语句请高手帮忙
- SQL Server中的长整型是什么?长度为15,如何设置?
- 按日期不同查询数据
- 如何通过 查询语句 得到如下图所示的结果集
- sql server如何进行数据库同步
- 如何用一句sql语句进行跨表查询?
ASDeclare @YwfhsFs Bit,@YwfHsBenYue Bit,@YwfLl decimal(9,5)--取系统参数
Select Top 1 @YwfhsFs=IsNull(YwfhsFs,1),@YwfHsBenYue=IsNull(YwfHsBenYue,0),@YwfLl=YwfLl From Config
if @YwfhsFs=1
begin if @YwfHsBenYue=1
insert into TempPljxKx(shenHe,Pzh,Upzh,UName,BeginDate,EndDate)
select shenHe,Pzh,Upzh,UNameBeginDate,EndDate from Ckinfo where shenHe=1 and YeMoney>0 and (month(getDate())>month(BeginDate) and FristYwf=0 or FristYwf<>0)
else
insert into TempPljxKx(shenHe,Pzh,UName,BeginDate,EndDate)
select shenHe,Pzh,Upzh,UName,BeginDate,EndDate from Ckinfo where shenHe=1 and YeMoney>0
end
GO
ASDeclare @YwfhsFs Bit,@YwfHsBenYue Bit,@YwfLl decimal(9,5)--取系统参数
Select Top 1 @YwfhsFs=IsNull(YwfhsFs,1),@YwfHsBenYue=IsNull(YwfHsBenYue,0),@YwfLl=YwfLl From Config
if @YwfhsFs=1
begin if @YwfHsBenYue=1
insert into TempPljxKx(shenHe,Pzh,Upzh,UName,BeginDate,EndDate)
select shenHe,Pzh,Upzh,UName,BeginDate,EndDate from Ckinfo where shenHe=1 and YeMoney>0
else
insert into TempPljxKx(shenHe,Pzh,Upzh,UName,BeginDate,EndDate)
select shenHe,Pzh,Upzh,UName,BeginDate,EndDate from Ckinfo where shenHe=1 and YeMoney>0
and ((month(getDate())>month(BeginDate) and FristYwf=0) or FristYwf<>0)
end