CORE-1553 : escape table name in MS SQL specific query

Fix for CORE-1553 (extract local variable for escaped table name and use it in query)