I'm using If Condition Srore procedure...
But .. I need if stored procedure with where in if else condition and concatenate with to and condition in Query..
Examble
create procedure [dbo].[Sp_Name]
@code int,
@dCode int
As
select <.........> from <tablename>
Where empcode=@code
if (@dCode != 0)
Begin
And dptcode=@ dCode
End
Please help me find a solution...