• I don't know where you going to code this batch exec code but can you do this?

    if within sql then

    declare @execstatementsbatch nvarchar(max)

    select @execstatementsbatch = ''

    SELECT @execstatementsbatch = @execstatementsbatch + 'EXEC UpdateQty ' + ItemCode + ', ' + QtyBO + '; '

    FROM ITEMSPO

    INNER JOIN .....

    <some conditions>

    exec(@execstatementsbatch)

    this isn't optimized way due to dynamic query i suppose, plus you have 4000/8000 char limit

    if you going to execute your batch from front end

    then you can build your batch in similar fashion as above (it will be quicker there)

    i've seen somewhere on forums similar kind of code you mentioned in your first post

    of directly selecting params into exec statement

    not able to find it now

    will keep you updated if i find it