fix(mssql): Further query fix for mssql

related to CAM-910