Sql Server Set Variable From Dynamic Sql