Friday, February 08, 2013 6:59 AM
I want to validate a particular batch of members by procedure udpvalidatemembers.
@MemberIdList is a table variable and I am having issues with the scope of this variable.
My code is something like thisdeclare @stmt nvarchar(max) =
'declare @MemberIdList mdm.IdList ' +
'insert into @MemberIdList ' +
'SELECT ID FROM mdm.SV_' + @Entity_Name + ' where validationstatus='''+@Validation+'''' +' '+ 'exec mdm.udpValidateMembers
@User_ID = @UserID, ' +
' @Version_ID = @VersionID, ' +
' @Entity_ID = @EntityID, ' +
' @MemberIdList = @MemberIdList, ' +
' @MemberType_ID = 1'
declare @params nvarchar(max) =
'@UserID int, ' +
'@VersionID int, ' +
@stmt = @stmt,
@params = @params,
@UserID = @User_ID,
@VersionID = @Version_ID,
@EntityID = @Entity_ID
Even I am having a where clause, But still all the members are getting validated.
Friday, February 08, 2013 9:29 AM
Its resolved now :)
Issue was filter condition was too stringent , no records were passing down. So, all records were getting updated.