Fix failing insert tests on sqlserver

Fixes the issue as mentioned in #5413