fix wrapping of sql server queries.