您好,
像我写
存储过程
ALTER proc [dbo].[testmultiplevalues](@emailid varchar(max)=null, @currlocation varchar(max)=null,@gender varchar(max)=null)
as
begin
declare @selquery varchar(max)
declare @concat varchar(max)
set @concat = ' '
set @selquery='select Emailid, currentlocation,Gender from userdetails where '
if(@emailid is not null)
begin
set @selquery=@selquery + 'Emailid=' +@emailid
set @concat=' and '
end
if(@currlocation is not null)
begin
set @selquery=@selquery + @concat + 'currentlocation=' +@currlocation
set @concat=' and '
end
if(@gender is not null)
begin
set @selquery =@selquery + @concat +'Gender=' + @gender
end
exec @selquery
end
进程创建successfully.but时IAM执行PROC IAM得到
错误 {C} 请帮我:7932936 |会员