Things to look for when rewriting Oracle SQL statements for use in SQL Server:
- Parameterize all the things!
- Fix unnamed subqueries (or consider converting to a join)
- If a filter should be case-sensitive but isn't, add a
COLLATE
clause - Always specify column names in
INSERT
statements - Move
ORDER BY
clauses out of subqueries - Get rid of
REPLACE(expression, "'", "''")
(and parameterize the expression)