存储过程
来源:互联网 发布:南昌广州seo外包 编辑:程序博客网 时间:2024/06/05 22:52
USE [机房重构]GO/****** Object: StoredProcedure [dbo].[proc_Account] Script Date: 04/23/2017 21:08:54 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: <Author,,Name>-- Create date: <Create Date,,>-- Description:<Description,,>-- =============================================ALTER PROCEDURE [dbo].[proc_Account] -- Add the parameters for the stored procedure here@UserID char(10),@RemainCash int,@RechargeCash int,@CancelCash int,@AllCash int,@ADate date,@Count intASdeclare @False char(10)BEGINSET NOCOUNT ON; set @False='未结账' --注册清况 if @Count=1 begin--exec('select CardNo,StudentNo,DDate,Time,IsCheck from Card_Info where Ischeck=@False and userID='+@UserID+'')--select CardNo,StudentNo,DDate,Time,IsCheck from Card_Info where Ischeck='未结账' and userID='+@UserID+'exec('select CardNo,StudentNo,DDate,Time,IsCheck from Card_Info where userID='+@UserID+'')end--充值情况 if @Count=2 begin--select CardNo,RechargeCash,RDate,Time,IsCheck from ReCharge_Info where IsCheck=@False and userID='+@UserID+'--exec('select CardNo,RechargeCash,RDate,Time,IsCheck from ReCharge_Info where userID='+@UserID+'+IsCheck =“未结账”')exec('select CardNo,RechargeCash,RDate,Time,IsCheck from ReCharge_Info where userID='+@UserID+'') end --退卡情况 if @Count=3 begin--select CardNo,CancelCash,EDate,Time,IsCheck from CancelCard_Info where Ischeck='未结账' and userID='+@UserID+'exec('select CardNo,CancelCash,EDate,Time,IsCheck from CancelCard_Info where userID='+@UserID+'')end--更新表情况 if @Count=5 beginupdate Card_Info set IsCheck='已结账' where userID=@UserID and IsCheck=@False update ReCharge_Info set IsCheck='已结账' where userID=@UserID and IsCheck=@False update CancelCard_Info set IsCheck='已结账' where userID=@UserID and IsCheck=@False insert into Check_Info (RemainCash,RechargeCash,CancelCash,AllCash,ADate,UserID )values(@RemainCash,@RechargeCash,@CancelCash,@AllCash,@ADate,@UserID )exec('select * from Check_Info ') end END
0 0
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- 存储过程
- Error:cannot open source file "itkImageToVTKImageFilter.h"
- java选择排序实现
- ubuntu16 备份 TimeShift
- 子树
- string类的简单实现(写时拷贝Copy-on-write)
- 存储过程
- Integer缓存原理与JVM调参应用
- lcm/gcd
- 记事本
- 1005. Spell It Right (20)
- 六、Git工作区和版本库的关系
- 对于FacebookF8开发者大会开源深度学习框架Caffe2以及百度开放自动驾驶平台API的看法
- 如何向mysql数据库中导入或导出txt文件
- mybatis+spring整合需要用到的包