店铺手续查询问题 [英] Store procedureQuery problem

查看:61
本文介绍了店铺手续查询问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此查询有效:用于插入

This Query is Work : use for insert

INSERT INTO Employee VALUES(@EmployeeID,@EmployeeName,@Emp_Title,@Address_1, @Address_2,@Area, case when @City<=0 then null else @City end,
        @Postcode,@JoiningDate,@BirthDate,@LeavingDate,case when @DepartmentID <=0 then null else @DepartmentID end, case when @DesignationID<=0 then null else @DesignationID end, @MobileNo,@Office_PhoneNo,@Residence_PhoneNo,@Email_ID,@Active);



我也想在这里使用 case但不起作用



i also want to use case here but not Works

Update Employee Set EmployeeName=@EmployeeName,Emp_Title=@Emp_Title,Address_1=@Address_1,Address_2=@Address_2,Area=@Area,City=@City,Postcode=@Postcode,JoiningDate=@JoiningDate,BirthDate=@BirthDate,LeavingDate=@LeavingDate,DepartmentID=@DepartmentID,DesignationID=@DesignationID,MobileNo=@MobileNo,Office_PhoneNo=@Office_PhoneNo,Residence_PhoneNo=@Residence_PhoneNo,Email_ID=@Email_ID,Active=@Active WHERE EmployeeID =  @EmployeeID




任何人都可以帮助我解决这个问题!!!!!!!!




any one help me to out This...!!

推荐答案


检查 http://www.bennadel.com/blog /933-Using-CASE-Statements-In-A-SQL-UPDATE-Query.htm [
Hi,

Check http://www.bennadel.com/blog/933-Using-CASE-Statements-In-A-SQL-UPDATE-Query.htm[^] very simple but it will explain Case in Update query.

Hope you got the answer from this link,


最后.我已经解决了这个问题.
问题是循环执行SP.
Finally. i got solution for this Problem.
problem is circular execute SP.


这篇关于店铺手续查询问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆