hi u4umang2001,
if(para1='' or para1= null) then
'update table1 set para2='''+@para2+''' and para3='''+@para3+''''
else
'update table1 set para1='''+@para1+''' and para2='''+@para2+''' and para3='''+@para3+''' '
Your query is little bit simple but you should try first using various article. These articles can be easily found using Google. If you want to learn things, you should try atleast once.
Following is solution for your query.
CREATE PROCEDURE sp_myStoredProcedure
@para1 varchar(100),
@para2 varchar(100),
@para3 varchar(100)
AS
if @para1 IS NULL
update table1 set para2=@para2 and para3=@para3
else
update table1 set para1=@para1 And para2=@para2 And para3=@para3
Go
Hope this will help you. Don't rely on others, first try yourself if not possible then ask for solution.
Thanks & Regards
Dilip Kumar Vishwakarma
Programmer .Net Consulting