Set Sql Variable Using Select Statement Where Condition