Multiple changes to make MS SQL work.
What a major pain!
BugzId: 3194