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
COLLATEclause - Always specify column names in
INSERTstatements - Move
ORDER BYclauses out of subqueries - Get rid of
REPLACE(expression, "'", "''")(and parameterize the expression)