• The two Tables are on the same server.Table B is used as Dynamic storage to change values depending on the requirement..i can create a variable in the stored procedure and assign the lock value to that variable so that i can use it in the comparison...