sql server - Stored procedure -
If I'm using a bad process ...
But .. if stored procedure In addition, if in other situations and in the query, and with the status join.
Exam
the process of making [dbo] [Sp_Name] @code int, select as @dCode int & lt; ......... & gt; From & lt; Tablename & gt; Start empcode = @ code if (@dCode! = 0) and dptcode = @ dcode end
Please help find a solution ...
Will this work for you:
the process of making [DBO]. [Sp_Name] @code int, select @ decode int & lt; ......... & gt; From & lt; Tablename & gt; Where empcode = @ code and (@dCode = 0 or dptcode = @ dcode)
Your question is very difficult to understand - this is what I actually did Understand.
Comments
Post a Comment